mirror of
https://github.com/actions/setup-node.git
synced 2025-12-14 08:37:00 +08:00
Implemented support for repository defined node version files such as '.nvmrc'
This commit is contained in:
15
README.md
15
README.md
@@ -55,6 +55,21 @@ steps:
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
Node version file:
|
||||
|
||||
The `node-version-file` input allows you to use a file within your repository which contains the version of node your project uses for example `.nvmrc`. If both the `node-version` and the `node-version-file` inputs are provided the `node-version` input is used.
|
||||
> The node version file is read from the project root
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
Matrix Testing:
|
||||
```yaml
|
||||
jobs:
|
||||
|
||||
Reference in New Issue
Block a user