moved node version section in README to advanced usage

added link to README
* migrated contents of version-file-workflow.yml to versions.yml
* further refactored parseNodeVersionFile() & tests
* removed type annotations in catch ()
This commit is contained in:
La'Kaleigh Harris 2021-10-05 15:01:26 +00:00 committed by GitHub
parent e471f47826
commit b1ed0c36e7
8 changed files with 113 additions and 17531 deletions

View file

@ -19,6 +19,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
```
## Architecture
You can use any of the [supported operating systems](https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners), and the compatible `architecture` can be selected using `architecture`. Values are `x86`, `x64`, `arm64`, `armv6l`, `armv7l`, `ppc64le`, `s390x` (not all of the architectures are available on all platforms).