mirror of
https://github.com/actions/setup-node.git
synced 2025-12-15 01:01:38 +08:00
work on resolving comments
This commit is contained in:
@@ -106,7 +106,9 @@ jobs:
|
||||
|
||||
## Nightly versions
|
||||
|
||||
You can specify a nightly version to download it from https://nodejs.org/download/nightly.
|
||||
You can specify a nightly version to download it from https://nodejs.org/download/nightly.
|
||||
|
||||
### Install nightly build for specific node version
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -117,7 +119,39 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.0.0-nightly' # or 16-nightly
|
||||
node-version: '16.0.0-nightly' # it will install the latest nigthly release for node 16.0.0
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
### Install nightly build for major node version
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Node sample
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16-nightly' # it will install the latest nigthly release for node 16
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
### Install the exact nightly version
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Node sample
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.0.0-nightly20210420a0261d231c'
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
```
|
||||
@@ -140,6 +174,8 @@ jobs:
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
**Note:** You should specify the exact version for rc: `16.0.0-rc.1`.
|
||||
|
||||
## Caching packages data
|
||||
The action follows [actions/cache](https://github.com/actions/cache/blob/main/examples.md#node---npm) guidelines, and caches global cache on the machine instead of `node_modules`, so cache can be reused between different Node.js versions.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user