Skip to content

Commit

Permalink
Run prebuilds before publish (#1202)
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen authored Jun 12, 2024
1 parent 7ee4464 commit b5d0478
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ jobs:
if: ${{ github.event_name == 'release' }}
name: Publishing to NPM
runs-on: ubuntu-20.04
needs: test
needs:
- prebuild
- prebuild-alpine
- prebuild-alpine-arm
- prebuild-linux-arm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -74,6 +78,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

prebuild:
if: ${{ github.event_name == 'release' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -84,7 +89,7 @@ jobs:
- windows-2019
name: Prebuild on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: publish
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -107,19 +112,21 @@ jobs:
${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
prebuild-alpine:
if: ${{ github.event_name == 'release' }}
strategy:
fail-fast: false
name: Prebuild on alpine
runs-on: ubuntu-latest
container: node:18-alpine
needs: publish
needs: test
steps:
- uses: actions/checkout@v4
- run: apk add build-base git python3 py3-setuptools --update-cache
- run: npm install --ignore-scripts
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}

prebuild-alpine-arm:
if: ${{ github.event_name == 'release' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -128,7 +135,7 @@ jobs:
- arm64
name: Prebuild on alpine (${{ matrix.arch }})
runs-on: ubuntu-latest
needs: publish
needs: test
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
Expand All @@ -140,6 +147,7 @@ jobs:
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"
prebuild-linux-arm:
if: ${{ github.event_name == 'release' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -148,7 +156,7 @@ jobs:
- arm64
name: Prebuild on Linux (${{ matrix.arch }})
runs-on: ubuntu-latest
needs: publish
needs: test
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
Expand Down

0 comments on commit b5d0478

Please sign in to comment.