Skip to content

Commit

Permalink
Multiple Electron platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jsubloom committed Sep 1, 2023
1 parent 520485b commit 42858a9
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/build-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
cache: yarn
cache-dependency-path: "**/yarn.lock"

- name: 1) [shared] Install dependencies
- name: 1) [shared] yarn install
run: yarn --frozen-lockfile
working-directory: packages/shared/

Expand All @@ -62,7 +62,7 @@ jobs:
echo "Size of yarn.lock: $yarn_lock_size bytes"
working-directory: packages/web/

- name: 2) [web] Install dependencies
- name: 2) [web] yarn install
# run: yarn --frozen-lockfile # TODO: --frozen-lockfile is erroring out, saying it must be updated. But it doesn't do that on my local machine. Why does it do that on the Github runner? Both seem to be using the same yarn version, 1.22.19
run: yarn
working-directory: packages/web/
Expand Down Expand Up @@ -125,9 +125,9 @@ jobs:
name: web-dist
path: packages/web/dist

- name: 3) [${{ matrix.platform }}] Install dependencies
# run: yarn --frozen-lockfile # TODO: --frozen-lockfile is erroring out, saying it must be updated. But it doesn't do that on my local machine. Why does it do that on the Github runner? Both seem to be using the same yarn version, 1.22.19
run: yarn
- name: 3) [${{ matrix.platform }}] yarn install
run: yarn --frozen-lockfile # TODO: --frozen-lockfile is erroring out, saying it must be updated. But it doesn't do that on my local machine. Why does it do that on the Github runner? Both seem to be using the same yarn version, 1.22.19
#run: yarn

- name: 3) [${{ matrix.platform }}] Check for compile errors
run: yarn tsc
Expand Down Expand Up @@ -165,9 +165,19 @@ jobs:
path: packages/mobile/build-*

build-electron:
name: electron binaries
name: electron (${{ matrix.platform }}) binaries
needs: build-dependencies
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
platform: [win, mac, unix]
include:
- os: windows-latest
platform: win
- os: macos-latest
platform: mac
- os: ubuntu-latest
platform: unix
defaults:
run:
working-directory: packages/electron-demo
Expand Down Expand Up @@ -195,7 +205,7 @@ jobs:
name: web-dist
path: packages/web/dist

- name: 3) [electron] Install dependencies
- name: 3) [electron] yarn install
run: yarn

- name: 3) [electron] Build
Expand All @@ -204,7 +214,7 @@ jobs:
- name: 3) [electron] Upload binary
uses: actions/upload-artifact@v3
with:
name: BloomReaderLite-electron-${{ inputs.releaseChannel }}
name: BloomReaderLite-electron-${{ matrix.platform }}-${{ inputs.releaseChannel }}
path: packages/electron-demo/output/*

cleanup:
Expand Down

0 comments on commit 42858a9

Please sign in to comment.