You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced-usage.md
+16
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,22 @@ steps:
19
19
- run: npm test
20
20
```
21
21
22
+
## Node version file
23
+
24
+
The `node-version-file` input accepts a path to a file containing the version of Node.js to be used by a project, for example `.nvmrc` or `.node-version`. If both the `node-version` and the `node-version-file` inputs are provided then the `node-version` input is used.
25
+
See [supported version syntax](https://github.com/actions/setup-node#supported-version-syntax)
26
+
> The action will search for the node version file relative to the repository root.
27
+
28
+
```yaml
29
+
steps:
30
+
- uses: actions/checkout@v2
31
+
- uses: actions/setup-node@v2
32
+
with:
33
+
node-version-file: '.nvmrc'
34
+
- run: npm install
35
+
- run: npm test
36
+
```
37
+
22
38
## Architecture
23
39
24
40
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).
0 commit comments