mirror of
https://github.com/actions/setup-node.git
synced 2026-08-22 08:32:54 +00:00
feat: added docs and improved tests
This commit is contained in:
parent
b4c315aa20
commit
8806b4bde4
2
.github/workflows/versions.yml
vendored
2
.github/workflows/versions.yml
vendored
@ -158,7 +158,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
|
||||
node-version-file:
|
||||
[.nvmrc, .tool-versions, .tool-versions-node, package.json]
|
||||
[.nvmrc, .tool-versions, .tool-versions-node, package.json, mise.toml]
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Setup node from node version file
|
||||
|
||||
2
__tests__/data/mise.toml
Normal file
2
__tests__/data/mise.toml
Normal file
@ -0,0 +1,2 @@
|
||||
[tools]
|
||||
node = "26.5.0"
|
||||
@ -5,7 +5,7 @@ inputs:
|
||||
node-version:
|
||||
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
|
||||
node-version-file:
|
||||
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.'
|
||||
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions, mise.toml.'
|
||||
architecture:
|
||||
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
|
||||
check-latest:
|
||||
|
||||
@ -76,7 +76,7 @@ steps:
|
||||
|
||||
## Node version file
|
||||
|
||||
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`, `.node-version`, `.tool-versions`, or `package.json`. If both the `node-version` and the `node-version-file` inputs are provided then the `node-version` input is used.
|
||||
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`, `.node-version`, `.tool-versions`, `mise.toml`, or `package.json`. If both the `node-version` and the `node-version-file` inputs are provided then the `node-version` input is used.
|
||||
See [supported version syntax](https://github.com/actions/setup-node#supported-version-syntax).
|
||||
|
||||
> The action will search for the node version file relative to the repository root.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user