Skip to content

Commit e4590d3

Browse files
committed
ci: update npm publish
1 parent 342d505 commit e4590d3

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

.github/workflows/npm-publish.yaml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,35 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v3
1515

16-
- name: Cache PNPM
17-
uses: actions/cache@v3
18-
with:
19-
path: ~/.pnpm-store
20-
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
21-
restore-keys: |
22-
${{ runner.os }}-node-
23-
- name: Setup Node
16+
- name: Install Node.js
2417
uses: actions/setup-node@v3
2518
with:
26-
node-version: 16
19+
node-version: 18
20+
21+
- uses: pnpm/action-setup@v2
22+
name: Install pnpm
23+
id: pnpm-install
24+
with:
25+
version: 8
26+
run_install: false
2727

28-
- name: Installing packages
29-
uses: pnpm/[email protected]
28+
- name: Get pnpm store directory
29+
id: pnpm-cache
30+
shell: bash
31+
run: |
32+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
33+
34+
- uses: actions/cache@v3
35+
name: Setup pnpm cache
3036
with:
31-
version: 7.x.x
32-
run_install: |
33-
- args: [--frozen-lockfile]
37+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
38+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-pnpm-store-
41+
42+
- name: Install dependencies
43+
run: pnpm install
44+
3445
- name: Build
3546
run: pnpm build
3647

0 commit comments

Comments
 (0)