Implemented support for repository defined node version files such as '.nvmrc'

This commit is contained in:
Taylor McCarthy 2020-11-01 17:04:22 -05:00
parent c6fd00ceb9
commit c3812bd36a
5 changed files with 83 additions and 0 deletions

View file

@ -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: