feat: added docs and improved tests

This commit is contained in:
Gustavo Perdomo 2026-07-30 23:51:33 -04:00
parent b4c315aa20
commit 8806b4bde4
No known key found for this signature in database
4 changed files with 5 additions and 3 deletions

View File

@ -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
View File

@ -0,0 +1,2 @@
[tools]
node = "26.5.0"

View File

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

View File

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