The actions/setup-node action supports a node-version-file input, which can point to a file that contains the version of node.js to use. It would be great if this action could also support reading the runtime version from a file (other than package.json).
We use a .node-version file to automatically get the correct Node.js version based on folder, using nvs auto. There is a PR to add that support, and if that was merged, I'd be happy for package.json to be the source of truth for the Node.js version instead, but until that point, I'd love if I could keep using .node-version without duplicating that version elsewhere in the codebase.
The
actions/setup-nodeaction supports anode-version-fileinput, which can point to a file that contains the version of node.js to use. It would be great if this action could also support reading the runtime version from a file (other thanpackage.json).We use a
.node-versionfile to automatically get the correct Node.js version based on folder, usingnvs auto. There is a PR to add that support, and if that was merged, I'd be happy forpackage.jsonto be the source of truth for the Node.js version instead, but until that point, I'd love if I could keep using.node-versionwithout duplicating that version elsewhere in the codebase.