Setup Node.js environment using actions/setup-node@v4.1.0

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/actions/setup-node?shareId=XXXX-XXXX-XXXX-XXXX).
This commit is contained in:
krp 2025-01-04 07:21:43 +09:00
parent 48b90677b6
commit ca6ea2abe0
5 changed files with 11 additions and 9 deletions

View File

@ -16,4 +16,4 @@ jobs:
name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with:
node-version: '20.x'
node-version: 'v4.1.0'

View File

@ -16,4 +16,4 @@ jobs:
name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with:
node-version: '20.x'
node-version: 'v4.1.0'

View File

@ -18,7 +18,7 @@ See [action.yml](action.yml)
<!-- start usage -->
```yaml
- uses: actions/setup-node@v4
- uses: actions/setup-node@v4.1.0
with:
# Version Spec of the version to use in SemVer notation.
# It also admits such aliases as lts/*, latest, nightly and canary builds
@ -84,7 +84,7 @@ See [action.yml](action.yml)
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@v4.1.0
with:
node-version: 18
- run: npm ci
@ -133,7 +133,7 @@ See the examples of using cache for `yarn`/`pnpm` and `cache-dependency-path` in
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@v4.1.0
with:
node-version: 20
cache: 'npm'
@ -146,7 +146,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@v4.1.0
with:
node-version: 20
cache: 'npm'
@ -168,7 +168,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node }}
- run: npm ci
@ -182,7 +182,7 @@ jobs:
To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action:
```yaml
uses: actions/setup-node@v4
uses: actions/setup-node@v4.1.0
with:
token: ${{ secrets.GH_DOTCOM_TOKEN }}
node-version: 20

View File

@ -34,7 +34,8 @@
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^2.0.1",
"semver": "^7.6.0",
"uuid": "^9.0.1"
"uuid": "^9.0.1",
"actions/setup-node@v4.1.0": "^4.1.0"
},
"devDependencies": {
"@types/jest": "^29.5.12",

View File

@ -1,4 +1,5 @@
import * as core from '@actions/core';
import * as setupNode from 'actions/setup-node@v4.1.0';
import os from 'os';