mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-08 13:11:11 +00:00
Implemented support for repository defined node version files such as '.nvmrc'
This commit is contained in:
parent
c6fd00ceb9
commit
c3812bd36a
5 changed files with 83 additions and 0 deletions
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue