Skip to content

Commit 0b4a837

Browse files
committed
ci: update pnpm action
1 parent 2b72603 commit 0b4a837

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,29 @@ jobs:
1818
fetch-depth: 0
1919

2020
- name: Set up pnpm
21-
uses: pnpm/action-setup@v2
21+
uses: pnpm/action-setup@v4
2222
with:
2323
version: latest
24+
run_install: false
25+
26+
- name: Install Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
cache: 'pnpm'
31+
32+
- name: Get pnpm store directory
33+
shell: bash
34+
run: |
35+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
36+
37+
- uses: actions/cache@v4
38+
name: Setup pnpm cache
39+
with:
40+
path: ${{ env.STORE_PATH }}
41+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
restore-keys: |
43+
${{ runner.os }}-pnpm-store-
2444
2545
- name: Install dependencies
2646
run: pnpm install --frozen-lockfile

0 commit comments

Comments
 (0)