Skip to content

Commit

Permalink
Add Node.js v22. Drop ancient EOL versions of Node.js and Electron (#…
Browse files Browse the repository at this point in the history
…1182)

Drop unsupported versions of node and electron
  • Loading branch information
mceachen committed May 12, 2024
1 parent 608f115 commit 2327f9a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ on:
workflow_dispatch: {}

env:
NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 --include-regex 'better_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 'better_sqlite3.node$'
# See https://nodejs.org/en/about/previous-releases
# Node.js 16 EOL = 11 Sep 2023
NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 --include-regex 'better_sqlite3.node$'
# See https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy
# The v25 EOL = 2023-dec-5. v26 EOL = 2024-feb-20. v27 EOL = 2024-apr-16. v28 EOL = 2024-jun-11. v29 EOL = 2024-aug-20.
ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -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 'better_sqlite3.node$'

jobs:
test:
Expand All @@ -29,6 +33,7 @@ jobs:
- 18
- 20
- 21
- 22
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -61,7 +66,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org
- run: npm publish
env:
Expand All @@ -82,7 +87,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- if: ${{ startsWith(matrix.os, 'windows') }}
run: pip.exe install setuptools
- if: ${{ startsWith(matrix.os, 'macos') }}
Expand All @@ -102,7 +107,7 @@ jobs:
prebuild-alpine:
name: Prebuild on alpine
runs-on: ubuntu-latest
container: node:16-alpine
container: node:18-alpine
needs: publish
steps:
- uses: actions/checkout@v4
Expand All @@ -123,7 +128,7 @@ jobs:
- 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 "\
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-alpine -c "\
apk add build-base git python3 py3-setuptools --update-cache && \
cd /tmp/project && \
npm install --ignore-scripts && \
Expand All @@ -142,7 +147,7 @@ jobs:
- 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 "\
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18 -c "\
cd /tmp/project && \
npm install --ignore-scripts && \
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- name: Configure user
run: |
git config --local user.name "${{ github.actor }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- name: Create new update branch
run: git checkout -b sqlite-update-${{ env.ENV_VERSION }}
- name: Update download script
Expand Down

0 comments on commit 2327f9a

Please sign in to comment.