mirror of
https://github.com/actions/setup-node.git
synced 2025-04-23 01:36:27 +00:00
docs: Update code samples to v3
Simple change to update code samples from v2 to v3 to reflect the latest version.
This commit is contained in:
parent
9ced9a43a2
commit
b70cc10d98
1 changed files with 11 additions and 11 deletions
22
README.md
22
README.md
|
@ -18,10 +18,10 @@ See [action.yml](action.yml)
|
||||||
**Basic:**
|
**Basic:**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '16'
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm test
|
- run: npm test
|
||||||
```
|
```
|
||||||
|
@ -50,10 +50,10 @@ See the examples of using cache for `yarn` / `pnpm` and `cache-dependency-path`
|
||||||
**Caching npm dependencies:**
|
**Caching npm dependencies:**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '16'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
@ -62,10 +62,10 @@ steps:
|
||||||
**Caching npm dependencies in monorepos:**
|
**Caching npm dependencies in monorepos:**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '16'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: subdir/package-lock.json
|
cache-dependency-path: subdir/package-lock.json
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
@ -82,9 +82,9 @@ jobs:
|
||||||
node: [ '12', '14', '16' ]
|
node: [ '12', '14', '16' ]
|
||||||
name: Node ${{ matrix.node }} sample
|
name: Node ${{ matrix.node }} sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
|
Loading…
Add table
Reference in a new issue