Skip to content

Commit 0f781ed

Browse files
authored
Create publish.yaml
1 parent 2f50c33 commit 0f781ed

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish package to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish-npm:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: pnpm/action-setup@v2
15+
with:
16+
version: 9.6.0
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
21+
registry-url: https://registry.npmjs.org/
22+
cache: pnpm
23+
24+
- run: pnpm install
25+
26+
- run: |
27+
VERSION=${{ github.ref_name }}
28+
pnpm setVersion -v ${VERSION:1}
29+
30+
- run: pnpm publish --no-git-checks
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

0 commit comments

Comments
 (0)