Skip to content

Commit

Permalink
Fix the build workflow broken by #989 (#994)
Browse files Browse the repository at this point in the history
* Move repetitive build commands into environment variables (#989)

* Move repetitive build commands into environment variables

* Merge 'https://github.com/mceachen/better-sqlite3/tree/dry-gha-989'

Co-authored-by: mceachen <mceachen@users.noreply.github.com>

---------

Co-authored-by: mceachen <mceachen@users.noreply.github.com>

* restore "env." prefixes to NODE_BUILD_CMD and ELECTRON_BUILD_CMD

---------

Co-authored-by: mceachen <mceachen@users.noreply.github.com>
Co-authored-by: Matthew McEachen <matthew@photostructure.com>
  • Loading branch information
3 people authored Apr 19, 2023
1 parent c88ca6d commit aaa8850
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ jobs:
with:
node-version: 16
- run: npm install --ignore-scripts
- run: ${{ NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
- run: ${{ ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
- run: ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
- if: matrix.os == 'windows-2019'
run: ${{ ELECTRON_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
run: ${{ env.ELECTRON_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
- if: matrix.os == 'macos-latest'
run: ${{ ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
run: ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}

prebuild-alpine:
name: Prebuild on alpine
Expand All @@ -87,7 +87,7 @@ jobs:
- uses: actions/checkout@v3
- run: apk add build-base git python3 --update-cache
- run: npm install --ignore-scripts
- run: ${{ NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}

prebuild-alpine-arm:
strategy:
Expand All @@ -106,7 +106,7 @@ jobs:
apk add build-base git python3 --update-cache && \
cd /tmp/project && \
npm install --ignore-scripts && \
${{ NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"
prebuild-linux-arm:
strategy:
Expand All @@ -124,4 +124,4 @@ jobs:
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:16 -c "\
cd /tmp/project && \
npm install --ignore-scripts && \
${{ NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"

0 comments on commit aaa8850

Please sign in to comment.