Skip to content

Commit 31e1688

Browse files
authored
ci: Change setup-node to read version from nvmrc (#1440)
Small thing I noticed when working on an action file is that the setup-node action supports reading the version from a file. This means our actions should automatically stay up to date any time we change the version in `.nvmrc`
1 parent ec7ccef commit 31e1688

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Use Node.js
3131
uses: actions/setup-node@v3
3232
with:
33-
node-version: '18.x'
33+
node-version-file: '.nvmrc'
3434
cache: 'npm'
3535

3636
- name: Cache node modules

.github/workflows/publish-alpha.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
ref: ${{ github.event.inputs.ref }}
2525
- uses: actions/setup-node@v3
2626
with:
27-
node-version: '18.x'
27+
node-version-file: '.nvmrc'
2828
registry-url: 'https://registry.npmjs.org'
2929
- run: npm ci
3030
- run: npm run build

.github/workflows/publish-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
fetch-depth: '0' # Need the history to properly select the canary version number
3636
- uses: actions/setup-node@v3
3737
with:
38-
node-version: '18.x'
38+
node-version-file: '.nvmrc'
3939
registry-url: 'https://registry.npmjs.org'
4040
- run: npm ci
4141
- run: npm run build

.github/workflows/publish-packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Node
1919
uses: actions/setup-node@v3
2020
with:
21-
node-version: '18.x'
21+
node-version-file: '.nvmrc'
2222
registry-url: 'https://registry.npmjs.org'
2323
- name: Install dependencies
2424
run: npm ci

.github/workflows/unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Use Node.js
3030
uses: actions/setup-node@v3
3131
with:
32-
node-version: '18.x'
32+
node-version-file: '.nvmrc'
3333
cache: 'npm'
3434

3535
- name: Cache jest

0 commit comments

Comments
 (0)