Skip to content

Commit 80324ed

Browse files
authored
Use .npmrc to pick up node version (#1697)
All repositories are already using a .npmrc file, so this reduces the amount of locations to update on node upgrade. Also, this bumps the release worflow from node 22 to 24, upgrading the default NPM version, which makes the manual NPM install unnecessary and works around the issue reported in nodejs/node#62425 (see https://github.com/inrupt/typescript-sdk-tools/actions/runs/24857693744/job/72774850607)
1 parent 3228dfb commit 80324ed

5 files changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v6
2424
- uses: actions/setup-node@v6
2525
with:
26-
node-version: 24
26+
node-version-file: ".nvmrc"
2727
cache: npm
2828
registry-url: "https://registry.npmjs.org"
2929
- run: npm ci --workspaces

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ jobs:
1919
- uses: actions/checkout@v6
2020
- uses: actions/setup-node@v6
2121
with:
22-
node-version: 22
22+
node-version-file: ".nvmrc"
2323
cache: npm
2424
registry-url: "https://registry.npmjs.org"
25-
# Ensure npm 11.5.1 or later for trusted publishing
26-
- run: npm install -g npm@latest
2725
- run: npm ci --workspaces
2826
# Running top-level ci should happen after workspaces level, running these
2927
# the other way around results in top-level dependencies (namely, lerna)

.github/workflows/reusable-audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v6
1414
- uses: actions/setup-node@v6
1515
with:
16-
node-version: "22"
16+
node-version-file: ".nvmrc"
1717
registry-url: "https://registry.npmjs.org"
1818
cache: "npm"
1919
# Install dependencies so license-checker actually checks them:

.github/workflows/reusable-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v6
2020
- uses: actions/setup-node@v6
2121
with:
22-
node-version: "22"
22+
node-version-file: ".nvmrc"
2323
cache: "npm"
2424
# Check the package.json is correctly formed
2525
- if: ${{inputs.usePackageCheck}}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

0 commit comments

Comments
 (0)