Support .nvmrc
See original GitHub issueIt would be nice if setup-node
understood an .nvmrc file (even if it does not use nvm under the hood, the idea is the node-version
is just the contents of the file).
If GitHub Actions as a whole could read the contents of a file as part of an expression, I could do something like
uses: setup-node@v1
with:
node-version: {{ contents(.nvmrc) }}
But I don’t know where to log that type of feature request!
Perhaps ‘.nvmrc’ could be used as a special placeholder, so that:
uses: setup-node@v1
with:
node-version: '.nvmrc'
Instructs this action to read the contents and treat the contents as the desired version?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:162
- Comments:34 (7 by maintainers)
Top Results From Across the Web
How to write a .nvmrc file which automatically change node ...
This makes it having a builtin support to switch node version automatically. Auto version switch in nodenv doesn't have to be hooked on ......
Read more >Node version doesn't loaded via .nvmrc : WEB-45434
I've installed multiple Node.js versions. In the project is specified via .nvmrc file v14.1.0 (default Node version is 11.15.0) If try commit changes, ......
Read more >Guarantee a Single Version of Node.js In All Environments
nvmrc file, and all GitHub Actions used LTS (long-term support, which at the time was v14). Since the new major version of this...
Read more >Specify Node Versions with .nvmrc
nvmrc is specifying that Node.js v16 should be used. Any developer could then run nvm use to download, install, and switch to that...
Read more >Automated Dependency Updates for nvm - Renovate Docs
Renovate supports updating nvm dependencies. File Matching¶. By default, Renovate will check any files matching the following regular expression: (^|/)\.nvmrc$ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Top GitHub Comments
If you got here from googling, let me tell you, that the newest and simplest way of reading the
.nvmrc
file and using it inactions/setup-node
is with the node-version-file option:Sorry, had a lapse when I wrote this. Try changing your workflow to:
Env variables are scoped to a given step so they don’t automatically carry over, but we can use outputs instead.