mirror of
https://github.com/actions/setup-node.git
synced 2025-12-18 06:17:35 +00:00
chore: bump version to 6.0.0 and update documentation
This commit is contained in:
parent
8f225c52ce
commit
33371d09d4
6 changed files with 44 additions and 51 deletions
22
README.md
22
README.md
|
|
@ -12,10 +12,14 @@ This action provides the following functionality for GitHub Actions users:
|
|||
- Registering problem matchers for error output
|
||||
- Configuring authentication for GPR or npm
|
||||
|
||||
## Breaking changes in V6
|
||||
|
||||
- Caching is now automatically enabled for npm projects when the `packageManager` field in `package.json` is set to `npm`. For other package managers, such as Yarn and pnpm, caching is disabled by default and must be configured manually using the `cache` input.
|
||||
|
||||
## Breaking changes in V5
|
||||
|
||||
- Enabled caching for npm dependencies by default when the package manager is detected and no cache input is provided.
|
||||
> For workflows with elevated privileges or access to sensitive information, we recommend disabling automatic caching for npm by setting `package-manager-cache: false` when caching is not needed for secure operation.
|
||||
- Enabled caching by default with package manager detection if no cache input is provided.
|
||||
> For workflows with elevated privileges or access to sensitive information, we recommend disabling automatic caching by setting `package-manager-cache: false` when caching is not needed for secure operation.
|
||||
|
||||
- Upgraded action from node20 to node24.
|
||||
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. [See Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
|
||||
|
|
@ -28,7 +32,7 @@ See [action.yml](action.yml)
|
|||
|
||||
<!-- start usage -->
|
||||
```yaml
|
||||
- uses: actions/setup-node@v5
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
# Version Spec of the version to use in SemVer notation.
|
||||
# It also admits such aliases as lts/*, latest, nightly and canary builds
|
||||
|
|
@ -114,7 +118,7 @@ See [action.yml](action.yml)
|
|||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
- run: npm ci
|
||||
|
|
@ -163,7 +167,7 @@ See the examples of using cache for `yarn`/`pnpm` and `cache-dependency-path` in
|
|||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
|
|
@ -176,7 +180,7 @@ steps:
|
|||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
|
|
@ -192,7 +196,7 @@ This behavior is controlled by the `package-manager-cache` input, which defaults
|
|||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
package-manager-cache: false
|
||||
- run: npm ci
|
||||
|
|
@ -212,7 +216,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v5
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm ci
|
||||
|
|
@ -226,7 +230,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@v5
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
||||
node-version: 24
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue