Skip to content

Commit a0623b0

Browse files
authored
ci: Remove manual caching for actions/setup-node (#2064)
1 parent 8508b8e commit a0623b0

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,7 @@ jobs:
6060
uses: actions/setup-node@v3
6161
with:
6262
node-version: ${{ matrix.NODE_VERSION }}
63-
- name: Cache Node.js modules
64-
uses: actions/cache@v3
65-
with:
66-
path: ~/.npm
67-
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
68-
restore-keys: |
69-
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
63+
cache: npm
7064
- run: npm ci
7165
- run: npm run lint
7266
- run: npm test -- --maxWorkers=4

.github/workflows/release-automated.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ jobs:
1919
with:
2020
node-version: 18
2121
registry-url: https://registry.npmjs.org/
22-
- name: Cache Node.js modules
23-
uses: actions/cache@v2
24-
with:
25-
path: ~/.npm
26-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
27-
restore-keys: |
28-
${{ runner.os }}-node-
22+
cache: npm
2923
- run: npm ci
3024
- run: npx semantic-release
3125
env:
@@ -35,7 +29,7 @@ jobs:
3529
- name: Determine tag on current commit
3630
id: tag
3731
run: echo "::set-output name=current_tag::$(git describe --tags --abbrev=0 --exact-match || echo '')"
38-
32+
3933
docs-publish:
4034
needs: release
4135
if: needs.release.outputs.current_tag != '' && github.ref == 'refs/heads/release'
@@ -49,13 +43,7 @@ jobs:
4943
uses: actions/setup-node@v1
5044
with:
5145
node-version: 16
52-
- name: Cache Node.js modules
53-
uses: actions/cache@v2
54-
with:
55-
path: ~/.npm
56-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
57-
restore-keys: |
58-
${{ runner.os }}-node-
46+
cache: npm
5947
- name: Generate Docs
6048
run: |
6149
npm ci

.github/workflows/release-manual-docs.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
inputs:
55
tag:
66
default: ''
7-
description: 'Version tag:'
7+
description: 'Version tag:'
88
jobs:
99
docs-publish:
1010
if: github.event.inputs.tag != ''
@@ -18,13 +18,7 @@ jobs:
1818
uses: actions/setup-node@v1
1919
with:
2020
node-version: 16
21-
- name: Cache Node.js modules
22-
uses: actions/cache@v2
23-
with:
24-
path: ~/.npm
25-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26-
restore-keys: |
27-
${{ runner.os }}-node-
21+
cache: npm
2822
- name: Generate Docs
2923
run: |
3024
npm ci

0 commit comments

Comments
 (0)