Skip to content

Commit f69eae9

Browse files
committed
add github action
1 parent 6a3e1ec commit f69eae9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/publish.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*" # Trigger only on tags that start with 'v', e.g., v1.0.0
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: "18" # Use your Node.js version
20+
registry-url: "https://registry.npmjs.org"
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Publish to npm
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
28+
run: npm publish

0 commit comments

Comments
 (0)