add backend profile selector #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OxLAUNCHER CI | |
on: | |
push: | |
branches: | |
- master | |
- releases | |
- native-refactor | |
pull_request: | |
branches: | |
- master | |
- releases | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
- name: Context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Use Node.js 16.17.0 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16.17.0' | |
- name: Install Nightly | |
run: | | |
rustup toolchain install nightly | |
- name: Change Python version (MacOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
ln -s -f /usr/local/bin/python3.11 /usr/local/bin/python3 | |
- name: Install rust (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
rustup target add x86_64-pc-windows-msvc --toolchain nightly | |
- name: Install rust (MacOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
rustup target add aarch64-apple-darwin --toolchain nightly | |
- name: Install rust (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
rustup target add x86_64-unknown-linux-gnu --toolchain nightly | |
- name: Switch rust to nightly | |
run: | | |
rustup default nightly | |
- name: npm run install | |
run: | | |
npm i --legacy-peer-deps | |
- name: npm i dmg-license (MacOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
npm i dmg-license --save-optional --legacy-peer-deps | |
- name: npm run release for windows | |
if: matrix.os == 'windows-latest' && github.event_name == 'push' | |
env: | |
CI: '' | |
TRAVIS_TAG: '' | |
APPVEYOR_REPO_TAG_NAME: '' | |
CIRCLE_TAG: '' | |
BITRISE_GIT_TAG: '' | |
GITHUB_ACTIONS: '' | |
CI_BUILD_TAG: '' | |
SENTRY_DSN: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_DSN || '' }}" | |
SOURCE_MAPS_UPLOAD: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_UPLOAD_SOURCE_MAPS_URL || '' }}" | |
SENTRY_AUTH: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_AUTH || '' }}" | |
REACT_CF_API_KEY: "${{ secrets.CF_API_KEY }}" | |
run: | | |
npm run release | |
- name: npm run release for mac and linux | |
if: matrix.os != 'windows-latest' || github.event_name != 'push' | |
env: | |
CI: '' | |
TRAVIS_TAG: '' | |
APPVEYOR_REPO_TAG_NAME: '' | |
CIRCLE_TAG: '' | |
GITHUB_ACTIONS: '' | |
BITRISE_GIT_TAG: '' | |
CI_BUILD_TAG: '' | |
SENTRY_DSN: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_DSN || '' }}" | |
SOURCE_MAPS_UPLOAD: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_UPLOAD_SOURCE_MAPS_URL || '' }}" | |
SENTRY_AUTH: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_AUTH || '' }}" | |
REACT_CF_API_KEY: "${{ secrets.CF_API_KEY }}" | |
run: | | |
npm run release | |
- name: upload release to gh releases | |
if: github.event_name == 'push' && github.ref == 'refs/heads/releases' | |
env: | |
GH_ACCESS_TOKEN_RELEASES: ${{ secrets.GH_ACCESS_TOKEN_RELEASES }} | |
run: | | |
npm run upload | |
- uses: actions/upload-artifact@v1 | |
if: matrix.os == 'macos-latest' | |
with: | |
name: MacOs Release | |
path: deploy | |
- uses: actions/upload-artifact@v1 | |
if: matrix.os == 'windows-latest' | |
with: | |
name: Windows Release | |
path: deploy | |
- uses: actions/upload-artifact@v1 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
name: Linux Release | |
path: deploy |