Skip to content

Commit bec6982

Browse files
ci: use .node-version to maintain node version
1 parent 6d68406 commit bec6982

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

.github/workflows/canary.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on:
55
- cron: 0 1 * * MON
66
workflow_dispatch:
77

8-
env:
9-
NODE_VERSION: lts/* # use the latest LTS release
10-
118
jobs:
129
canary:
1310
# prevents this action from running on forks
@@ -20,10 +17,10 @@ jobs:
2017
- name: Install pnpm
2118
uses: pnpm/action-setup@v2
2219

23-
- name: Set node version to LTS
20+
- name: Install Node.js
2421
uses: actions/setup-node@v3
2522
with:
26-
node-version: ${{ env.NODE_VERSION }}
23+
node-version-file: '.node-version'
2724
registry-url: 'https://registry.npmjs.org'
2825
cache: 'pnpm'
2926

.github/workflows/ci.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
permissions:
1111
contents: read # to fetch code (actions/checkout)
1212

13-
env:
14-
NODE_VERSION: lts/* # use the latest LTS release
15-
1613
jobs:
1714
unit-test:
1815
runs-on: ubuntu-latest
@@ -23,10 +20,10 @@ jobs:
2320
- name: Install pnpm
2421
uses: pnpm/action-setup@v2
2522

26-
- name: Set node version to LTS
23+
- name: Install Node.js
2724
uses: actions/setup-node@v3
2825
with:
29-
node-version: ${{ env.NODE_VERSION }}
26+
node-version-file: '.node-version'
3027
cache: 'pnpm'
3128

3229
- name: Skip Puppeteer download
@@ -46,10 +43,10 @@ jobs:
4643
- name: Install pnpm
4744
uses: pnpm/action-setup@v2
4845

49-
- name: Set node version to LTS
46+
- name: Install Node.js
5047
uses: actions/setup-node@v3
5148
with:
52-
node-version: ${{ env.NODE_VERSION }}
49+
node-version-file: '.node-version'
5350
cache: 'pnpm'
5451

5552
- name: Skip Puppeteer download
@@ -78,10 +75,10 @@ jobs:
7875
- name: Install pnpm
7976
uses: pnpm/action-setup@v2
8077

81-
- name: Set node version to LTS
78+
- name: Install Node.js
8279
uses: actions/setup-node@v3
8380
with:
84-
node-version: ${{ env.NODE_VERSION }}
81+
node-version-file: '.node-version'
8582
cache: 'pnpm'
8683

8784
- run: pnpm install
@@ -98,10 +95,10 @@ jobs:
9895
- name: Install pnpm
9996
uses: pnpm/action-setup@v2
10097

101-
- name: Set node version to LTS
98+
- name: Install Node.js
10299
uses: actions/setup-node@v3
103100
with:
104-
node-version: ${{ env.NODE_VERSION }}
101+
node-version-file: '.node-version'
105102
cache: 'pnpm'
106103

107104
- name: Skip Puppeteer download

.github/workflows/size-data.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
- name: Install pnpm
2222
uses: pnpm/action-setup@v2
2323

24-
- name: Set node version to LTS
24+
- name: Install Node.js
2525
uses: actions/setup-node@v3
2626
with:
27-
node-version: lts/*
27+
node-version-file: '.node-version'
2828
cache: pnpm
2929

3030
- name: Install dependencies

.github/workflows/size-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
- name: Install pnpm
2424
uses: pnpm/action-setup@v2
2525

26-
- name: Set node version to LTS
26+
- name: Install Node.js
2727
uses: actions/setup-node@v3
2828
with:
29-
node-version: lts/*
29+
node-version-file: '.node-version'
3030
cache: pnpm
3131

3232
- name: Install dependencies

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

0 commit comments

Comments
 (0)