Skip to content

Commit c40140b

Browse files
authored
Stop using deprecated set-output (#370)
The initial impetus for this change was: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ However, it turns out the entire step is unnecesary since `actions/setup-node` supports directly reading the `.nvmrc` file.
1 parent 042f8db commit c40140b

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

.github/workflows/check-dist.yml

Lines changed: 1 addition & 5 deletions
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 ::set-output name=NVMRC::$(cat .nvmrc)
22-
2319
- name: Setup Node.js
2420
uses: actions/setup-node@v3
2521
with:
26-
node-version: ${{ steps.nvm.outputs.NVMRC }}
22+
node-version-file: .nvmrc
2723

2824
- name: Install NPM dependencies
2925
run: npm ci

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
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 ::set-output name=NVMRC::$(cat .nvmrc)
23-
2420
- name: Setup Node.js
2521
uses: actions/setup-node@v3
2622
with:
27-
node-version: ${{ steps.nvm.outputs.NVMRC }}
23+
node-version-file: .nvmrc
2824

2925
- name: Install npm dependencies
3026
run: npm ci

.github/workflows/dependabot-build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,10 @@ jobs:
3737
ref: ${{ github.event.pull_request.head.ref }}
3838
token: ${{ secrets.DEPENDABOT_AUTOMATION_PAT }}
3939

40-
- name: Read .nvmrc
41-
id: nvm
42-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
43-
4440
- name: Setup Node.js
4541
uses: actions/setup-node@v3
4642
with:
47-
node-version: ${{ steps.nvm.outputs.NVMRC }}
43+
node-version-file: .nvmrc
4844

4945
- name: Install NPM dependencies
5046
run: npm ci

0 commit comments

Comments
 (0)