From 8c1a902bf7db86ef2d6d298b58d33b1db11ea2fb Mon Sep 17 00:00:00 2001 From: jsu <41497174+jsubloom@users.noreply.github.com> Date: Fri, 1 Sep 2023 01:12:10 -0500 Subject: [PATCH] Multiple Electron platforms --- .github/workflows/build-local.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-local.yml b/.github/workflows/build-local.yml index a21795b..1d67c68 100644 --- a/.github/workflows/build-local.yml +++ b/.github/workflows/build-local.yml @@ -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/ @@ -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/ @@ -128,8 +128,8 @@ jobs: path: packages/web/ - 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 + 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 @@ -167,9 +167,20 @@ 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] + #platform: [win, unix] + include: + - os: windows-latest + platform: win + #- os: macos-latest + # platform: mac + - os: ubuntu-latest + platform: unix defaults: run: working-directory: packages/electron-demo @@ -197,7 +208,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 @@ -206,7 +217,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: