Skip to content

Commit 75a3768

Browse files
authored
ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#3)
1 parent 12aabe6 commit 75a3768

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

.github/workflows/release.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ jobs:
1212
- uses: actions/setup-node@v2
1313
with:
1414
node-version: 16
15-
- uses: actions/cache@v2
16-
with:
17-
path: ~/.npm
18-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
19-
restore-keys: |
20-
${{ runner.os }}-node-
15+
cache: npm
2116
- run: npm ci
2217
- run: npx semantic-release
2318
env:

.github/workflows/test.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ jobs:
1919
uses: actions/setup-node@v2
2020
with:
2121
node-version: ${{ matrix.node_version }}
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-
22+
cache: npm
2823
- run: npm ci
2924
- run: npm test
3025

0 commit comments

Comments
 (0)