Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to setup-node@v4 in docs #884

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ See [action.yml](action.yml)

<!-- start usage -->
```yaml
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
# Version Spec of the version to use in SemVer notation.
# It also emits such aliases as lts, latest, nightly and canary builds
Expand Down Expand Up @@ -84,7 +84,7 @@ See [action.yml](action.yml)
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
Expand Down Expand Up @@ -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@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand All @@ -146,7 +146,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand All @@ -168,7 +168,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
Expand All @@ -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@v3
uses: actions/setup-node@v4
with:
token: ${{ secrets.GH_DOTCOM_TOKEN }}
node-version: 16
Expand Down
42 changes: 21 additions & 21 deletions docs/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ If `check-latest` is set to `true`, the action first checks if the cached versio
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
check-latest: true
Expand All @@ -64,7 +64,7 @@ See [supported version syntax](https://github.com/actions/setup-node#supported-v
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm ci
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14'
architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default
Expand All @@ -117,7 +117,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.0.0-v8-canary' # it will install the latest v8 canary release for node 20.0.0
- run: npm ci
Expand All @@ -132,7 +132,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20-v8-canary' # it will install the latest v8 canary release for node 20
- run: npm ci
Expand All @@ -148,7 +148,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 'v20.1.1-v8-canary20221103f7e2421e91'
- run: npm ci
Expand All @@ -168,7 +168,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16-nightly' # it will install the latest nightly release for node 16
- run: npm ci
Expand All @@ -184,7 +184,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.0.0-nightly' # it will install the latest nightly release for node 16.0.0
- run: npm ci
Expand All @@ -200,7 +200,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.0.0-nightly20210420a0261d231c'
- run: npm ci
Expand All @@ -218,7 +218,7 @@ jobs:
name: Node sample
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.0.0-rc.1'
- run: npm ci
Expand All @@ -235,7 +235,7 @@ Yarn caching handles both yarn versions: 1 or 2.
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14'
cache: 'yarn'
Expand All @@ -257,7 +257,7 @@ steps:
- uses: pnpm/action-setup@v2
with:
version: 6.32.9
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14'
cache: 'pnpm'
Expand All @@ -273,7 +273,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14'
cache: 'npm'
Expand All @@ -286,7 +286,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14'
cache: 'npm'
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
Expand All @@ -336,15 +336,15 @@ jobs:
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com'
- run: npm publish
Expand All @@ -356,15 +356,15 @@ steps:
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14.x'
registry-url: <registry url>
- run: yarn install --frozen-lockfile
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com'
- run: yarn publish
Expand All @@ -376,7 +376,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -396,7 +396,7 @@ Below you can find a sample "Setup .yarnrc.yml" step, that is going to allow you
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14.x'
- name: Setup .yarnrc.yml
Expand Down
Loading