Skip to content

Commit a8006e1

Browse files
authored
Add publish workflow (#35)
* add publish workflow * remove unnecessary permissions
1 parent 71ea1a8 commit a8006e1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Diff for: .github/workflows/publish.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 22.x
19+
cache: yarn
20+
21+
- run: yarn install
22+
- run: yarn build
23+
24+
- name: Publish to NPM
25+
run: yarn publish --tag latest --access public
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)