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
{{ message }}
Repository navigation
Feature request: Support .node-version to specify the version #206
I'm using nodenv to handle a lot of versions of node binaries on my computer. It provides a .node-version file to change node version based on the current directory. So, I specify the local node version by .node-version as well as setup-node input in GitHub Actions.
In this case, I want to make a .node-version file the only place where the node version is notated. To achieve this, I sometimes read .node-version and provide the result to setup-node like this:
This is acceptable, but I think it is a better option for setup-node to have node-version-file as another way to specify the node version like this:
steps:
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v2-beta
with:
node-version-path: '.node-version' # it should be configurable for something like monorepo project which does not have .node-version on the root
I'm willing to implement this feature if the team accepts the idea. Thanks for reading my proposal 😄
@ruscon what, in your opinion, makes it "better"? I personally think a version-manager agnostic implementation (using a file that isn't version-manager specific) should be preferred.
Activity
jasonkarns commentedon Feb 6, 2021
FWIW, nodenv has an action that will read the .node-version file for you specifically to enable passing that version to setup-node: https://github.com/nodenv/actions-node-version
ruscon commentedon Mar 13, 2021
this solution is better
#239
jasonkarns commentedon Mar 15, 2021
@ruscon what, in your opinion, makes it "better"? I personally think a version-manager agnostic implementation (using a file that isn't version-manager specific) should be preferred.
ruscon commentedon Mar 15, 2021
@jasonkarns "better" => "generic"
chore(deps-dev): bump @typescript-eslint/eslint-plugin (actions#206)