Skip to content

Commit 709971b

Browse files
committed
add github publish action
1 parent af7a56a commit 709971b

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-npm:
9+
name: Publish to NPM
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build project
25+
run: npm run build
26+
27+
- name: Publish package to npm
28+
run: npm publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vvplot",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"license": "MIT",
55
"files": [
66
"dist"
@@ -15,6 +15,8 @@
1515
"imports": {
1616
"#base/*": "./src/*"
1717
},
18+
"homepage": "https://fan-ix.github.io/vvplot/",
19+
"repository": "https://github.com/Fan-iX/vvplot/",
1820
"exports": {
1921
".": "./dist/index.js",
2022
"./components": "./dist/components.js",

0 commit comments

Comments
 (0)