Skip to content

Commit 18d7db5

Browse files
committed
ci: update the cache strategy to improve performance
1 parent e9c0f11 commit 18d7db5

File tree

10 files changed

+179
-413
lines changed

10 files changed

+179
-413
lines changed

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,29 @@ permissions:
1111
statuses: write
1212

1313
jobs:
14-
test:
14+
run-unit-tests:
1515
uses: ./.github/workflows/reusable-test.yml
1616
with:
1717
use-matrix: true
1818

1919
publish-npm:
20-
needs: test
20+
needs: run-unit-tests
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v4
24-
- uses: actions/setup-node@v4
24+
25+
- name: Use Node.js ${{ vars.DEFAULT_NODE_VERSION }}
26+
uses: actions/setup-node@v4
2527
with:
2628
node-version: ${{ vars.DEFAULT_NODE_VERSION }}
27-
registry-url: https://registry.npmjs.org/
29+
cache: 'npm'
30+
cache-dependency-path: |
31+
'**/package-lock.json'
32+
'package-legacy-node.json'
33+
2834
- name: Install dependencies
2935
run: npm ci
36+
3037
- name: Build package
3138
run: npm run build
3239

0 commit comments

Comments
 (0)