From e4be200df73f6eac4fd79758b83956a2fa3d4090 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 10:53:50 +0800 Subject: [PATCH 01/16] Build for windows ARM64 --- .github/workflows/build.yml | 101 ++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..df5ed7ecf --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,101 @@ +name: build + +on: + workflow_dispatch: + inputs: {} + +env: + NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' + ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'node_sqlite3.node$' + +jobs: + test: + strategy: + matrix: + os: + - windows-2019 + node: + - 18 + - 20 + - 21 + name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - if: ${{ startsWith(matrix.os, 'windows') }} + run: pip.exe install setuptools + - run: npm install --ignore-scripts + - run: npm run build-debug + - run: npm test + + prebuild: + strategy: + matrix: + os: + - windows-2019 + name: Prebuild on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 16 + - if: ${{ startsWith(matrix.os, 'windows') }} + run: pip.exe install setuptools + - run: npm install --ignore-scripts + - run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} + - run: ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} + - if: matrix.os == 'windows-2019' + run: | + npx --no-install prebuild -r node -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} + ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} + + prebuild-alpine: + name: Prebuild on alpine + runs-on: ubuntu-latest + container: node:16-alpine + + 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: + strategy: + matrix: + arch: + - arm64 + name: Prebuild on alpine (${{ matrix.arch }}) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - run: | + docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:16-alpine -c "\ + apk add build-base git python3 py3-setuptools --update-cache && \ + cd /tmp/project && \ + npm install --ignore-scripts && \ + ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}" + + prebuild-linux-arm: + strategy: + matrix: + arch: + - arm64 + name: Prebuild on Linux (${{ matrix.arch }}) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - run: | + docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:16 -c "\ + cd /tmp/project && \ + npm install --ignore-scripts && \ + ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}" From 9179bd8d5f889dc0b6abe40fe4fac161284eb398 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 11:05:17 +0800 Subject: [PATCH 02/16] Update ci.yml --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 019451787..eadc0da9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,6 @@ name: CI on: workflow_dispatch: - pull_request: - push: - branches: - - master - tags: - - '*' env: FORCE_COLOR: 1 concurrency: From 68436ec93faa60af5b350b7aca19b0f37dc703a1 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 11:08:44 +0800 Subject: [PATCH 03/16] Update build.yml --- .github/workflows/build.yml | 69 ------------------------------------- 1 file changed, 69 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df5ed7ecf..41f55c7ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,28 +9,6 @@ env: ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'node_sqlite3.node$' jobs: - test: - strategy: - matrix: - os: - - windows-2019 - node: - - 18 - - 20 - - 21 - name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - - if: ${{ startsWith(matrix.os, 'windows') }} - run: pip.exe install setuptools - - run: npm install --ignore-scripts - - run: npm run build-debug - - run: npm test - prebuild: strategy: matrix: @@ -47,55 +25,8 @@ jobs: - if: ${{ startsWith(matrix.os, 'windows') }} run: pip.exe install setuptools - run: npm install --ignore-scripts - - run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} - - run: ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} - if: matrix.os == 'windows-2019' run: | npx --no-install prebuild -r node -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} - prebuild-alpine: - name: Prebuild on alpine - runs-on: ubuntu-latest - container: node:16-alpine - - 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: - strategy: - matrix: - arch: - - arm64 - name: Prebuild on alpine (${{ matrix.arch }}) - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: docker/setup-qemu-action@v3 - - run: | - docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:16-alpine -c "\ - apk add build-base git python3 py3-setuptools --update-cache && \ - cd /tmp/project && \ - npm install --ignore-scripts && \ - ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}" - - prebuild-linux-arm: - strategy: - matrix: - arch: - - arm64 - name: Prebuild on Linux (${{ matrix.arch }}) - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: docker/setup-qemu-action@v3 - - run: | - docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:16 -c "\ - cd /tmp/project && \ - npm install --ignore-scripts && \ - ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}" From ac4c25dcc7c3db025b5840756138421b7ac02693 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 11:28:13 +0800 Subject: [PATCH 04/16] Update build.yml --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41f55c7ec..533b546d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: env: NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' - ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'node_sqlite3.node$' + ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'node_sqlite3.node$' jobs: prebuild: @@ -29,4 +29,11 @@ jobs: run: | npx --no-install prebuild -r node -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} + - name: Upload binaries to commit artifacts + uses: actions/upload-artifact@v3 + if: matrix.os == 'windows-2019' + with: + name: prebuilt-binaries + path: prebuilds/* + retention-days: 7 From 1b6230b7df7dadb3dbd9393cd011dfeb1e9ebe45 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 11:41:28 +0800 Subject: [PATCH 05/16] Update build.yml --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 533b546d3..585d08cae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,9 @@ on: workflow_dispatch: inputs: {} +permissions: + contents: write + env: NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'node_sqlite3.node$' @@ -31,7 +34,6 @@ jobs: ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} - name: Upload binaries to commit artifacts uses: actions/upload-artifact@v3 - if: matrix.os == 'windows-2019' with: name: prebuilt-binaries path: prebuilds/* From 1615c7d777ffed4028ef7b6aca8fb4bb696a7970 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 11:52:11 +0800 Subject: [PATCH 06/16] Update build.yml --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 585d08cae..07fcbae3b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,8 +4,7 @@ on: workflow_dispatch: inputs: {} -permissions: - contents: write +permissions: write-all env: NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' From e6f410aa81696bc575d3d4f665f62d41d7c2a575 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:08:23 +0800 Subject: [PATCH 07/16] Create prebuild.yml --- .github/workflows/prebuild.yml | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/prebuild.yml diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml new file mode 100644 index 000000000..b144a55a6 --- /dev/null +++ b/.github/workflows/prebuild.yml @@ -0,0 +1,76 @@ +name: CI +on: + workflow_dispatch: + inputs: {} +env: + FORCE_COLOR: 1 +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - windows-latest + host: + - x64 + target: + - arm64 + node: + - 18 + include: + - os: windows-latest + node: 18 + host: x86 + target: arm64 + name: ${{ matrix.os }} (host=${{ matrix.host }}, target=${{ matrix.target }}) + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + architecture: ${{ matrix.host }} + + - name: Add setuptools for Python 3.12 (temp) + run: pip install setuptools + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.3 + if: contains(matrix.os, 'windows') + with: + msbuild-architecture: ${{ matrix.target }} + + - name: Install dependencies + run: yarn install --ignore-scripts + + - name: Check Node compatibility + run: node tools/semver-check.js + + - name: Add env vars + shell: bash + run: | + echo "V=1" >> $GITHUB_ENV + + if [ "${{ matrix.target }}" = "x86" ]; then + echo "TARGET=ia32" >> $GITHUB_ENV + else + echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV + fi + + - name: Build binaries + run: yarn prebuild -a ${{ env.TARGET }} + + - name: Run tests + run: yarn test + + - name: Upload binaries to commit artifacts + uses: actions/upload-artifact@v3 + if: matrix.node == 18 + with: + name: prebuilt-binaries + path: prebuilds/* + retention-days: 7 + From b6a67367642d1cb6cea4bff14d7b67d13a9b2279 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:12:32 +0800 Subject: [PATCH 08/16] Update prebuild.yml --- .github/workflows/prebuild.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index b144a55a6..0a8574fc8 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -1,4 +1,4 @@ -name: CI +name: prebuild on: workflow_dispatch: inputs: {} @@ -21,11 +21,6 @@ jobs: - arm64 node: - 18 - include: - - os: windows-latest - node: 18 - host: x86 - target: arm64 name: ${{ matrix.os }} (host=${{ matrix.host }}, target=${{ matrix.target }}) steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 @@ -41,7 +36,7 @@ jobs: uses: microsoft/setup-msbuild@v1.3 if: contains(matrix.os, 'windows') with: - msbuild-architecture: ${{ matrix.target }} + msbuild-architecture: ${{ matrix.host }} - name: Install dependencies run: yarn install --ignore-scripts From 7d5200532e5ce2d1ad408265afafe40b6a2a09a3 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:17:18 +0800 Subject: [PATCH 09/16] Update prebuild.yml --- .github/workflows/prebuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 0a8574fc8..56f1c57cf 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -20,7 +20,7 @@ jobs: target: - arm64 node: - - 18 + - 16 name: ${{ matrix.os }} (host=${{ matrix.host }}, target=${{ matrix.target }}) steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 From 97f263ca7707121ce314add85c3abed155a09ed0 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:21:48 +0800 Subject: [PATCH 10/16] Update prebuild.yml --- .github/workflows/prebuild.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 56f1c57cf..10d8dc000 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -20,10 +20,10 @@ jobs: target: - arm64 node: - - 16 + - 18 name: ${{ matrix.os }} (host=${{ matrix.host }}, target=${{ matrix.target }}) steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} @@ -31,6 +31,8 @@ jobs: - name: Add setuptools for Python 3.12 (temp) run: pip install setuptools + - run: npm install --ignore-scripts + - run: npx --no-install prebuild -r node -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.3 From 231045ddc601c6fb58408bd3ff377628902d3ad2 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:27:00 +0800 Subject: [PATCH 11/16] Update prebuild.yml --- .github/workflows/prebuild.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 10d8dc000..80889b02d 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -32,8 +32,6 @@ jobs: - name: Add setuptools for Python 3.12 (temp) run: pip install setuptools - run: npm install --ignore-scripts - - run: npx --no-install prebuild -r node -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} - - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.3 if: contains(matrix.os, 'windows') From d27e25cf71ce73da7898f0df5b5f5c5ec9d1be3a Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:27:42 +0800 Subject: [PATCH 12/16] Update prebuild.yml --- .github/workflows/prebuild.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 80889b02d..44b465319 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -31,7 +31,7 @@ jobs: - name: Add setuptools for Python 3.12 (temp) run: pip install setuptools - - run: npm install --ignore-scripts + - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.3 if: contains(matrix.os, 'windows') @@ -41,9 +41,6 @@ jobs: - name: Install dependencies run: yarn install --ignore-scripts - - name: Check Node compatibility - run: node tools/semver-check.js - - name: Add env vars shell: bash run: | From caf82c8314231acc2d8adfff495ce4860d3e1d04 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:32:07 +0800 Subject: [PATCH 13/16] Update prebuild.yml --- .github/workflows/prebuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 44b465319..03381a2f0 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -20,7 +20,7 @@ jobs: target: - arm64 node: - - 18 + - 20 name: ${{ matrix.os }} (host=${{ matrix.host }}, target=${{ matrix.target }}) steps: - uses: actions/checkout@v4 From dce5a7db2ee9c23061da8f0901a1f58b392a32fe Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:39:50 +0800 Subject: [PATCH 14/16] Update prebuild.yml --- .github/workflows/prebuild.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 03381a2f0..6c4462f3d 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -55,9 +55,6 @@ jobs: - name: Build binaries run: yarn prebuild -a ${{ env.TARGET }} - - name: Run tests - run: yarn test - - name: Upload binaries to commit artifacts uses: actions/upload-artifact@v3 if: matrix.node == 18 From e83ba78212a995bb365efbde87776574a291a5a8 Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 12:47:05 +0800 Subject: [PATCH 15/16] Update prebuild.yml --- .github/workflows/prebuild.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 6c4462f3d..f345baa97 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -57,7 +57,6 @@ jobs: - name: Upload binaries to commit artifacts uses: actions/upload-artifact@v3 - if: matrix.node == 18 with: name: prebuilt-binaries path: prebuilds/* From 4c31cfa5f83bcf010e0afc11d581fb01667cbfbc Mon Sep 17 00:00:00 2001 From: macvip Date: Wed, 8 May 2024 13:24:13 +0800 Subject: [PATCH 16/16] Delete .github/workflows/build.yml --- .github/workflows/build.yml | 40 ------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 07fcbae3b..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: build - -on: - workflow_dispatch: - inputs: {} - -permissions: write-all - -env: - NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' - ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'node_sqlite3.node$' - -jobs: - prebuild: - strategy: - matrix: - os: - - windows-2019 - name: Prebuild on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 16 - - if: ${{ startsWith(matrix.os, 'windows') }} - run: pip.exe install setuptools - - run: npm install --ignore-scripts - - if: matrix.os == 'windows-2019' - run: | - npx --no-install prebuild -r node -t 20.0.0 -t 21.0.0 --include-regex 'node_sqlite3.node$' --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} - ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} - - name: Upload binaries to commit artifacts - uses: actions/upload-artifact@v3 - with: - name: prebuilt-binaries - path: prebuilds/* - retention-days: 7 -