2025-04-22 21:13 UTC
@j9t nice tip 👍
You can replace these 2 steps:
```
- name: "Read .nvmrc"
id: nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
- name: "Set up Node.js"
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
```
With one option of the `setup-node` action:
```
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
```
Replies (1)
-
@j9t@mas.to 2025-04-23 08:53
@nhoizey, ah, beautiful! Tested successfully, updated the article (including thanks 🙂) and the gist! Thank you…! 🙏