Skip to content
This repository was archived by the owner on Jul 20, 2022. It is now read-only.

Commit 7ac7b9c

Browse files
update publish github workflow
1 parent 24aa138 commit 7ac7b9c

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/publish.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Package to npmjs
1+
name: Publish package to npm
22
on:
33
release:
44
types: [created]
@@ -7,13 +7,28 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10+
1011
# Setup .npmrc file to publish to npm
1112
- uses: actions/setup-node@v2
1213
with:
1314
node-version: "14.x"
1415
registry-url: "https://registry.npmjs.org"
15-
- run: npm install
16-
- run: npm run build
16+
17+
- name: Cache pnpm modules
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.pnpm-store
21+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
22+
restore-keys: |
23+
${{ runner.os }}-
24+
25+
- uses: pnpm/[email protected]
26+
with:
27+
version: 6.24.0
28+
run_install: true
29+
30+
- run: pnpm run build
31+
1732
- run: npm publish
1833
env:
1934
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)