Skip to content

Commit 52c51f5

Browse files
authored
ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#30)
1 parent d8adfde commit 52c51f5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v1
16+
- uses: actions/setup-node@v2
1717
with:
1818
node-version: 12
19+
cache: npm
1920
- run: npm ci
2021
- run: npm run build --if-present
2122
- run: npx semantic-release

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v2
1414
- uses: actions/setup-node@v2
15+
with:
16+
cache: npm
1517
- run: npm ci
1618
- run: npm test
1719
createComment:
@@ -21,6 +23,8 @@ jobs:
2123
steps:
2224
- uses: actions/checkout@v2
2325
- uses: actions/setup-node@v2
26+
with:
27+
cache: npm
2428
- run: npm ci
2529
- run: node test/fixtures/app.js
2630
env:

0 commit comments

Comments
 (0)