We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a7cb44 commit ca25cd9Copy full SHA for ca25cd9
1 file changed
.github/workflows/publish.yaml
@@ -0,0 +1,21 @@
1
+name: 发布 NPM 包
2
+
3
+on:
4
+ push:
5
+ tags:
6
+ - 'v*' # 匹配所有以v开头的tag
7
8
+jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - uses: actions/setup-node@v4
14
+ with:
15
+ node-version: '18'
16
+ registry-url: 'https://registry.npmjs.org'
17
+ - name: 配置 NPM 认证
18
+ run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NODE_AUTH_TOKEN }}
19
+ - run: npm publish
20
+ env:
21
+ NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
0 commit comments