Skip to content

Commit 4cdccea

Browse files
authored
chore: update node-integration workflow template to latest actions (#9836)
## Situation If the GitHub Actions [.github/workflows/node-integration.yml](https://github.com/npm/cli/blob/latest/.github/workflows/node-integration.yml) workflow "nodejs integration" is run, it outputs multiple deprecation warnings, including the text "Node.js 20 is deprecated." and referring to the blog article [Deprecation of Node 20 on GitHub Actions runners](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/) dated September 19, 2025. ## Change Update action usage in [scripts/template-oss/node-integration-yml.hbs](https://github.com/npm/cli/blob/latest/scripts/template-oss/node-integration-yml.hbs) to latest versions with `runs.using` `node24`: | BEFORE | AFTER | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | [actions/cache@v3](https://github.com/actions/cache/tree/v3) | [actions/cache@v6](https://github.com/actions/cache/tree/v6) | | [actions/download-artifact@v4](https://github.com/actions/download-artifact/tree/v4) | [actions/download-artifact@v8](https://github.com/actions/download-artifact/tree/v8) | | [actions/github-script@v6](https://github.com/actions/github-script/tree/v6) | [actions/github-script@v9](https://github.com/actions/github-script/tree/v9) | | [actions/upload-artifact@v4](https://github.com/actions/upload-artifact/tree/v4) | [actions/upload-artifact@v7](https://github.com/actions/upload-artifact/tree/v7) | ## Verification Run workflow `node-integration` with: nodejs: 26.5.1 npm version: 12.0.2 Confirm that there are no longer deprecation warnings output. ## References - closes #9834
1 parent bea9066 commit 4cdccea

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

.github/workflows/node-integration.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
echo "build=$targetFile" >> $GITHUB_OUTPUT
138138
echo "::endgroup::"
139139
- name: upload artifacts
140-
uses: actions/upload-artifact@v4
140+
uses: actions/upload-artifact@v7
141141
with:
142142
name: nodejs-${{ steps.build-nodejs.outputs.nodeVersion }}
143143
path: |
@@ -156,7 +156,7 @@ jobs:
156156
with:
157157
override_cache_key: nodejs-${{ inputs.nodeVersion }}
158158
- name: download artifacts
159-
uses: actions/download-artifact@v4
159+
uses: actions/download-artifact@v8
160160
with:
161161
name: nodejs-${{ needs.build-nodejs.outputs.nodeVersion }}
162162
- name: test nodejs
@@ -173,7 +173,7 @@ jobs:
173173
- build-nodejs
174174
steps:
175175
- name: download artifacts
176-
uses: actions/download-artifact@v4
176+
uses: actions/download-artifact@v8
177177
with:
178178
name: nodejs-${{ needs.build-nodejs.outputs.nodeVersion }}
179179
path: ${{ runner.temp }}
@@ -190,7 +190,7 @@ jobs:
190190
echo "${RUNNER_TEMP}/node/bin" >> $GITHUB_PATH
191191
echo "cache=$(npm config get cache)" >> $GITHUB_OUTPUT
192192
- name: setup npm cache
193-
uses: actions/cache@v3
193+
uses: actions/cache@v6
194194
with:
195195
path: ${{ steps.install.outputs.cache }}
196196
key: npm-tests
@@ -248,7 +248,7 @@ jobs:
248248
npm install --no-save --no-audit --no-fund citgm npm-package-arg
249249
- name: generate matrix
250250
id: generate-matrix
251-
uses: actions/github-script@v6
251+
uses: actions/github-script@v9
252252
env:
253253
NODE_VERSION: "${{ inputs.nodeVersion }}"
254254
INSTALL_FLAGS: "${{ inputs.installFlags }}"
@@ -361,7 +361,7 @@ jobs:
361361
include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
362362
steps:
363363
- name: download artifacts
364-
uses: actions/download-artifact@v4
364+
uses: actions/download-artifact@v8
365365
with:
366366
name: nodejs-${{ needs.build-nodejs.outputs.nodeVersion }}
367367
path: ${{ runner.temp }}
@@ -376,7 +376,7 @@ jobs:
376376
echo "${RUNNER_TEMP}/node/bin" >> $GITHUB_PATH
377377
echo "cache=$(npm config get cache)" >> $GITHUB_OUTPUT
378378
- name: setup npm cache
379-
uses: actions/cache@v3
379+
uses: actions/cache@v6
380380
with:
381381
path: ${{ steps.install.outputs.cache }}
382382
key: npm-${{ matrix.package }}

scripts/template-oss/node-integration-yml.hbs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
echo "build=$targetFile" >> $GITHUB_OUTPUT
136136
echo "::endgroup::"
137137
- name: upload artifacts
138-
uses: actions/upload-artifact@v4
138+
uses: actions/upload-artifact@v7
139139
with:
140140
name: nodejs-$\{{ steps.build-nodejs.outputs.nodeVersion }}
141141
path: |
@@ -154,7 +154,7 @@ jobs:
154154
with:
155155
override_cache_key: nodejs-$\{{ inputs.nodeVersion }}
156156
- name: download artifacts
157-
uses: actions/download-artifact@v4
157+
uses: actions/download-artifact@v8
158158
with:
159159
name: nodejs-$\{{ needs.build-nodejs.outputs.nodeVersion }}
160160
- name: test nodejs
@@ -171,7 +171,7 @@ jobs:
171171
- build-nodejs
172172
steps:
173173
- name: download artifacts
174-
uses: actions/download-artifact@v4
174+
uses: actions/download-artifact@v8
175175
with:
176176
name: nodejs-$\{{ needs.build-nodejs.outputs.nodeVersion }}
177177
path: $\{{ runner.temp }}
@@ -188,7 +188,7 @@ jobs:
188188
echo "${RUNNER_TEMP}/node/bin" >> $GITHUB_PATH
189189
echo "cache=$(npm config get cache)" >> $GITHUB_OUTPUT
190190
- name: setup npm cache
191-
uses: actions/cache@v3
191+
uses: actions/cache@v6
192192
with:
193193
path: $\{{ steps.install.outputs.cache }}
194194
key: npm-tests
@@ -246,7 +246,7 @@ jobs:
246246
npm install --no-save --no-audit --no-fund citgm npm-package-arg
247247
- name: generate matrix
248248
id: generate-matrix
249-
uses: actions/github-script@v6
249+
uses: actions/github-script@v9
250250
env:
251251
NODE_VERSION: "$\{{ inputs.nodeVersion }}"
252252
INSTALL_FLAGS: "$\{{ inputs.installFlags }}"
@@ -359,7 +359,7 @@ jobs:
359359
include: $\{{ fromJson(needs.generate-matrix.outputs.matrix) }}
360360
steps:
361361
- name: download artifacts
362-
uses: actions/download-artifact@v4
362+
uses: actions/download-artifact@v8
363363
with:
364364
name: nodejs-$\{{ needs.build-nodejs.outputs.nodeVersion }}
365365
path: $\{{ runner.temp }}
@@ -374,7 +374,7 @@ jobs:
374374
echo "${RUNNER_TEMP}/node/bin" >> $GITHUB_PATH
375375
echo "cache=$(npm config get cache)" >> $GITHUB_OUTPUT
376376
- name: setup npm cache
377-
uses: actions/cache@v3
377+
uses: actions/cache@v6
378378
with:
379379
path: $\{{ steps.install.outputs.cache }}
380380
key: npm-$\{{ matrix.package }}

0 commit comments

Comments
 (0)