Skip to content

Commit afcdf46

Browse files
committed
ci: cache with node version
1 parent eea1e23 commit afcdf46

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- name: Setup node
1515
uses: actions/setup-node@v2
1616
with:
17-
node-version: 14.x
17+
node-version: 14
1818
registry-url: https://registry.npmjs.org/
1919

2020
- run: npm publish --access public
2121
env:
22-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
node-version: [13.x, 14.x, 15.x, 16.x]
17+
node-version: [13, 14, 15, 16]
1818
steps:
1919
- uses: actions/checkout@v2
2020

@@ -23,10 +23,10 @@ jobs:
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525

26-
- uses: actions/cache@v1
26+
- uses: actions/cache@v2
2727
with:
2828
path: ./node_modules
29-
key: node-1-${{ hashFiles('yarn.lock') }}
29+
key: node-1-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
3030

3131
- run: yarn
3232
if: steps.cache-primes.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)