Skip to content

Commit 77f6661

Browse files
committed
👷 add auto publish action
1 parent b399d5c commit 77f6661

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Node.js Package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20.11.1
20+
registry-url: https://registry.npmjs.org
21+
- run: npm ci
22+
- run: npm install
23+
- run: npm publish --access public
24+
env:
25+
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "liveproxy-service-worker",
3-
"version": "1.0.0",
2+
"name": "@slax-lab/liveproxy-sw",
3+
"version": "1.0.2-dev.1",
44
"description": "liveproxy service worker",
55
"main": "index.js",
66
"type": "module",
@@ -10,6 +10,10 @@
1010
"build:dev": "webpack --mode=development",
1111
"build:prod": "webpack --mode=production"
1212
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/slax-lab/liveproxy-service-worker"
16+
},
1317
"keywords": [],
1418
"author": "daguang",
1519
"license": "ISC",
@@ -24,6 +28,10 @@
2428
"webpack": "^5.98.0",
2529
"webpack-cli": "^6.0.1"
2630
},
31+
"files": [
32+
"dist",
33+
"README.md"
34+
],
2735
"dependencies": {
2836
"acorn": "^8.14.1"
2937
}

0 commit comments

Comments
 (0)