Update dependencies #556
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: launcher | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
electron-windows: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@master | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: '**/yarn.lock' | |
- run: yarn install | |
- name: Generate client | |
run: | | |
$env:API_HOST = "${{ github.event.inputs.api_host || 'dev.wotw.orirando.com' }}" | |
$env:API_SECURE = "true" | |
$env:IS_ELECTRON = "true" | |
yarn run generate | |
Copy-item -Force -Recurse -Verbose ".\dist\*" -Destination ".\electron\public\" | |
- name: Build electron | |
working-directory: .\\electron | |
run: | | |
yarn install | |
yarn run electron:build -w | |
- name: Write Git revision | |
run: | | |
md -Path '.\electron\dist_electron\win-unpacked\randomizer' | |
git rev-parse HEAD > .\electron\dist_electron\win-unpacked\randomizer\launcher.revision | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: launcher | |
retention-days: 7 | |
path: | | |
.\electron\dist_electron\win-unpacked\* | |
electron-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@master | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: '**/yarn.lock' | |
- run: yarn install | |
- name: Generate client | |
run: | | |
export API_HOST="${{ github.event.inputs.api_host || 'dev.wotw.orirando.com' }}" | |
export API_SECURE="true" | |
export IS_ELECTRON="true" | |
yarn run generate | |
cp -vr ./dist/* ./electron/public/ | |
- name: Build electron | |
working-directory: ./electron | |
run: | | |
yarn install | |
yarn run electron:build -l | |
cp -vrp ./external/* ./dist_electron/linux-unpacked/ | |
- name: Write Git revision | |
run: | | |
mkdir -p ./electron/dist_electron/linux-unpacked/randomizer | |
git rev-parse HEAD > ./electron/dist_electron/linux-unpacked/randomizer/launcher.revision | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: launcher | |
retention-days: 7 | |
path: | | |
./electron/dist_electron/linux-unpacked/* |