Skip to content

Commit dc09c5a

Browse files
committed
ci: simplify caching for node
1 parent 6411c48 commit dc09c5a

File tree

2 files changed

+3
-49
lines changed

2 files changed

+3
-49
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,8 @@ jobs:
2727
node-version-file: .nvmrc
2828
cache: pnpm
2929

30-
- name: Get pnpm store directory
31-
id: pnpm-cache
32-
shell: bash
33-
run: |
34-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
35-
36-
- name: Setup pnpm cache
37-
uses: actions/cache@v4
38-
with:
39-
path: |
40-
${{ steps.pnpm-cache.outputs.STORE_PATH }}
41-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42-
restore-keys: |
43-
${{ runner.os }}-pnpm-store-
44-
4530
- name: Install dependencies 👨🏻‍💻
46-
run: pnpm install
31+
run: pnpm install --frozen-lockfile
4732

4833
- name: Validate current commit (last commit) with commitlint
4934
if: github.event_name == 'push'
@@ -73,23 +58,8 @@ jobs:
7358
node-version-file: .nvmrc
7459
cache: pnpm
7560

76-
- name: Get pnpm store directory
77-
id: pnpm-cache
78-
shell: bash
79-
run: |
80-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
81-
82-
- name: Setup pnpm cache
83-
uses: actions/cache@v4
84-
with:
85-
path: |
86-
${{ steps.pnpm-cache.outputs.STORE_PATH }}
87-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
88-
restore-keys: |
89-
${{ runner.os }}-pnpm-store-
90-
9161
- name: Install dependencies 👨🏻‍💻
92-
run: pnpm install
62+
run: pnpm install --frozen-lockfile
9363

9464
- name: Build 🏗️
9565
run: pnpm run build

.github/workflows/release.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,9 @@ jobs:
4040
- uses: actions/setup-node@v4
4141
with:
4242
node-version-file: .nvmrc
43-
cache: pnpm
44-
45-
- name: Get pnpm store directory
46-
id: pnpm-cache
47-
shell: bash
48-
run: |
49-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
50-
51-
- name: Setup pnpm cache
52-
uses: actions/cache@v4
53-
with:
54-
path: |
55-
${{ steps.pnpm-cache.outputs.STORE_PATH }}
56-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
57-
restore-keys: |
58-
${{ runner.os }}-pnpm-store-
5943

6044
- name: Install dependencies 👨🏻‍💻
61-
run: pnpm install
45+
run: pnpm install --frozen-lockfile
6246

6347
- name: publish to npm
6448
run: |

0 commit comments

Comments
 (0)