@tkpdx01/ccc 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*' # 当 push v 开头的 tag 时触发
7
+ workflow_dispatch: # 允许手动触发
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: 20
18
+ registry-url: https://registry.npmjs.org/
19
+ cache: 'npm' # 启用 npm 缓存
20
+
21
+ - name: Install dependencies
22
+ run: npm ci
23
+
24
+ - name: Test
25
+ run: npm test
26
+
27
+ - name: Publish to npm
28
+ run: npm publish --access public
29
+ env:
30
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}