Update workflow pins and migrate Node matrices to modern versions (#1583)

* Update workflow action pins and move Node 20 to 26

* fix: correct node version in v8-canary and update setup for node 22 x86

* chore: update setup-node action version from v6 to v7 in documentation

* fix: update pnpm/action-setup version to v6 in advanced usage documentation
This commit is contained in:
Haritha 2026-07-16 10:33:56 -05:00 • committed by GitHub
parent 05e62e6009
commit 1b7c366466
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 107 additions and 107 deletions

View file

@ -46,7 +46,7 @@ To run without a lockfile:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
package-manager-cache: false # Explicitly disable caching if you don't have a lockfile
@ -65,7 +65,7 @@ If `check-latest` is set to `true`, the action first checks if the cached versio
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
check-latest: true
@ -84,7 +84,7 @@ See [supported version syntax](https://github.com/actions/setup-node#supported-v
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version-file: '.nvmrc'
package-manager-cache: false # Disable automatic npm caching if not required
@ -129,7 +129,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default
@ -151,7 +151,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.0.0-v8-canary' # it will install the latest v8 canary release for node 24.0.0
package-manager-cache: false # Disable automatic npm caching if not required
@ -167,7 +167,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24-v8-canary' # it will install the latest v8 canary release for node 24
package-manager-cache: false # Disable automatic npm caching if not required
@ -184,7 +184,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: 'v24.0.0-v8-canary2025030537242e55ac'
package-manager-cache: false # Disable automatic npm caching if not required
@ -205,7 +205,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24-nightly' # it will install the latest nightly release for node 24
package-manager-cache: false # Disable automatic npm caching if not required
@ -222,7 +222,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.0.0-nightly' # it will install the latest nightly release for node 24.0.0
package-manager-cache: false # Disable automatic npm caching if not required
@ -239,7 +239,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.0.0-nightly202505066102159fa1'
package-manager-cache: false # Disable automatic npm caching if not required
@ -258,7 +258,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.0.0-rc.4'
package-manager-cache: false # Disable automatic npm caching if not required
@ -277,7 +277,7 @@ Yarn caching handles both Yarn Classic (v1) and Yarn Berry (v2, v3, v4+).
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: 'yarn'
@ -296,10 +296,10 @@ steps:
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: 'pnpm'
@ -315,7 +315,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: 'npm'
@ -328,7 +328,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: 'npm'
@ -351,7 +351,7 @@ steps:
# version: 10
- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: '24'
package-manager-cache: false # Disable automatic npm caching if not required
@ -397,9 +397,9 @@ jobs:
- macos-latest
- windows-latest
node_version:
- 20
- 22
- 24
- 26
architecture:
- x64
# an extra windows-x86 run:
@ -411,7 +411,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
@ -424,7 +424,7 @@ jobs:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
@ -433,7 +433,7 @@ steps:
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
registry-url: 'https://npm.pkg.github.com'
package-manager-cache: false # Disable automatic npm dependency caching to reduce cache poisoning risk
@ -446,7 +446,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.x'
registry-url: <registry url>
@ -455,7 +455,7 @@ steps:
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }}
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
registry-url: 'https://npm.pkg.github.com'
package-manager-cache: false # Disable automatic npm dependency caching to reduce cache poisoning risk
@ -468,7 +468,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
@ -489,7 +489,7 @@ Below you can find a sample "Setup .yarnrc.yml" step, that is going to allow you
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.x'
package-manager-cache: false # Disable automatic npm dependency caching to reduce cache poisoning risk
@ -535,7 +535,7 @@ You must also configure a **Trusted Publisher** in npm for your package/scope th
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
@ -558,7 +558,7 @@ It is possible to specify a token to authenticate with the mirror using the `mir
The token will be passed in the `Authorization` header.
```yaml
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24.x'
mirror: 'https://nodejs.org/dist'