Skip to content

Commit 6b2448e

Browse files
authored
feat(templates): add 'npm' cache to scaffolded github-actions (#47)
1 parent 5d32ea8 commit 6b2448e

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

templates/github-actions/release.yml

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

templates/github-actions/test.yml

Lines changed: 1 addition & 6 deletions
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)