Skip to content

Commit a428a10

Browse files
authored
feat: publish using node@24 (#1329)
npm is outdated and doesn't support trusted publishing so we need to use a newer node version to publish which implicily updates npm (also we don't want corepack strict check to block npm)
1 parent 3192116 commit a428a10

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
test:
1717
name: Node ${{ matrix.node }} and ${{ matrix.os }}
1818
timeout-minutes: 30
19+
env:
20+
COREPACK_DEFAULT_TO_LATEST: '0'
21+
COREPACK_ENABLE_STRICT: '0'
1922
strategy:
2023
fail-fast: false
2124
matrix:
@@ -28,12 +31,12 @@ jobs:
2831
pull-requests: write # to be able to comment on released pull requests
2932
id-token: write # required for npm trusted publishing (OIDC)
3033
steps:
31-
- uses: actions/checkout@v5
34+
- uses: actions/checkout@v6
3235
# https://github.com/nodejs/node-gyp#installation
33-
- name: Use Python 3.11
36+
- name: Use Python 3.12
3437
uses: actions/setup-python@v6
3538
with:
36-
python-version: '3.11'
39+
python-version: '3.12'
3740
# https://github.com/hargasinski/node-canvas/blob/e7abe64833d13ec96449c827b1e14befbdf3105d/.github/workflows/ci.yaml#L70
3841
- name: "macOS dependencies"
3942
if: matrix.os == 'macos-latest'
@@ -46,28 +49,27 @@ jobs:
4649
run: |
4750
sudo apt update
4851
sudo apt install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev librsvg2-dev
49-
- uses: pnpm/action-setup@v4
50-
with:
51-
run_install: false
52+
- name: Enable Corepack
53+
run: corepack enable pnpm
5254
- name: Use Node.js ${{ matrix.node }}
5355
uses: actions/setup-node@v6
5456
with:
5557
cache: pnpm
5658
node-version: ${{ matrix.node }}
5759
check-latest: true
5860
- name: Install Dependencies
59-
run: pnpm add --global node-gyp && pnpm install --frozen-lockfile
61+
run: npm i -g node-gyp && pnpm install --frozen-lockfile
6062
- name: Build Test Binary
6163
run: pnpm build-test-binary
6264
- name: Build
6365
run: pnpm build
6466
- name: Run Tests
6567
run: pnpm test
6668
- name: Coverage
67-
if: matrix.os == 'ubuntu-latest' && matrix.node == 22 # only run once
69+
if: matrix.os == 'ubuntu-latest' && matrix.node == 24 # only run once
6870
run: pnpm test-coverage
6971
- name: Maybe Release
70-
if: matrix.os == 'ubuntu-latest' && matrix.node == 22 && github.event_name == 'push' && github.ref == 'refs/heads/main'
72+
if: matrix.os == 'ubuntu-latest' && matrix.node == 24 && github.event_name == 'push' && github.ref == 'refs/heads/main'
7173
env:
7274
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7375
run: pnpm --dir publish install --ignore-workspace --frozen-lockfile && ./publish/node_modules/.bin/semantic-release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"license": "MIT",
1010
"main": "./dist/ncc/index.js",
1111
"bin": {
12-
"ncc": "./dist/ncc/cli.js"
12+
"ncc": "dist/ncc/cli.js"
1313
},
1414
"files": [
1515
"dist"

0 commit comments

Comments
 (0)