Skip to content

Commit e77138d

Browse files
authored
ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#33)
1 parent a51c8f5 commit e77138d

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ jobs:
1616
- uses: actions/setup-node@v2
1717
with:
1818
node-version: "12.x"
19-
- uses: actions/cache@v2
20-
with:
21-
path: ~/.npm
22-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23-
restore-keys: |
24-
${{ runner.os }}-node-
19+
cache: npm
2520
- run: npm ci
2621
- run: npm run build
2722
- run: npx semantic-release

.github/workflows/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

.github/workflows/update-prettier.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ jobs:
1212
- uses: actions/setup-node@v2
1313
with:
1414
version: 12
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: npm run lint:fix
2318
- uses: gr2m/[email protected]

0 commit comments

Comments
 (0)