Skip to content

Commit 7d75a4a

Browse files
authored
Start using node-version-file param (#1262)
We don't need to manually read it because `actions/setup-node` supports directly reading the `.nvmrc` file.
1 parent 0d7ca16 commit 7d75a4a

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

Diff for: .github/workflows/check-dist.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@ jobs:
1616
with:
1717
ref: ${{ github.event.pull_request.head.sha }}
1818

19-
- name: Read .nvmrc
20-
id: nvm
21-
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
22-
2319
- name: Setup Node.js
2420
uses: actions/setup-node@v4
2521
with:
26-
node-version: ${{ steps.nvm.outputs.NVMRC }}
22+
node-version-file: .nvmrc
2723

2824
- name: Install npm dependencies
2925
run: npm clean-install

Diff for: .github/workflows/dependabot-build.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,10 @@ jobs:
3535
ref: ${{ github.event.pull_request.head.ref }}
3636
token: ${{ secrets.DEPENDABOT_AUTOBUILD }}
3737

38-
- name: Read .nvmrc
39-
id: nvm
40-
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
41-
4238
- name: Setup Node.js
4339
uses: actions/setup-node@v4
4440
with:
45-
node-version: ${{ steps.nvm.outputs.NVMRC }}
41+
node-version-file: .nvmrc
4642

4743
- name: Install npm dependencies
4844
run: npm clean-install

Diff for: .github/workflows/integration-test.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@ jobs:
1717
with:
1818
ref: ${{ github.event.pull_request.head.sha }}
1919

20-
- name: Read .nvmrc
21-
id: nvm
22-
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
23-
2420
- name: Setup Node.js
2521
uses: actions/setup-node@v4
2622
with:
27-
node-version: ${{ steps.nvm.outputs.NVMRC }}
23+
node-version-file: .nvmrc
2824

2925
- name: Install npm dependencies
3026
run: npm clean-install

Diff for: .github/workflows/test.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ jobs:
1515
with:
1616
ref: ${{ github.event.pull_request.head.sha }}
1717

18-
- name: Read .nvmrc
19-
id: nvm
20-
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
21-
2218
- name: Setup Node.js
2319
uses: actions/setup-node@v4
2420
with:
25-
node-version: ${{ steps.nvm.outputs.NVMRC }}
21+
node-version-file: .nvmrc
2622

2723
- name: Install npm dependencies
2824
run: npm clean-install

0 commit comments

Comments
 (0)