Skip to content

Commit a92f83b

Browse files
committed
ci: fix pnpm cache
1 parent 9566748 commit a92f83b

File tree

1 file changed

+29
-14
lines changed

1 file changed

+29
-14
lines changed

.github/workflows/publish.yaml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,41 @@ name: Publish
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67

78
jobs:
8-
version:
9+
cache-and-install:
910
runs-on: ubuntu-latest
1011
steps:
11-
- uses: actions/checkout@v3
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Cache PNPM
16+
uses: actions/cache@v3
1217
with:
13-
submodules: true
14-
- uses: pnpm/action-setup@v2
18+
path: ~/.pnpm-store
19+
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
20+
restore-keys: |
21+
${{ runner.os }}-node-
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v3
1525
with:
16-
version: 7
17-
run_install: false
18-
- uses: actions/setup-node@v3
26+
node-version: 16
27+
28+
- name: Installing dependencies
29+
uses: pnpm/[email protected]
1930
with:
20-
node-version: 18.x
21-
cache: 'pnpm'
22-
- run: pnpm install --frozen-lockfile
23-
- run: |
31+
version: 7.x.x
32+
run_install: |
33+
- args: [--frozen-lockfile]
34+
35+
- name: Build packages
36+
run: pnpm build
37+
38+
- name: Publish packages
39+
run: |
2440
echo "//registry.npmjs.org/:_authToken="${{secrets.NPM_TOKEN}}"" > ~/.npmrc
2541
shell: sh
26-
- run: pnpm build
27-
- run: pnpm -r --filter='./packages/*' publish --access public
42+
run: pnpm -r --filter='./packages/*' publish --access public

0 commit comments

Comments
 (0)