File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 5
5
push :
6
6
branches :
7
7
- main
8
- # paths:
9
- # - src/**
10
- pull_request :
11
- branches :
12
- - main
13
- # paths:
14
- # - src/**
15
8
16
9
# 任务
17
10
jobs :
@@ -25,21 +18,23 @@ jobs:
25
18
- name : Use Node.js
26
19
uses : actions/setup-node@v3
27
20
with :
28
- node-version : 16.14 .x
21
+ node-version : 18.12 .x
29
22
registry-url : ' https://registry.npmjs.org'
30
23
cache : ' npm'
31
24
32
25
# 执行测试和打包操作
33
26
- run : npm ci
34
27
35
28
# lint check
36
- - run : npm run lint
29
+ # - run: npm run lint
37
30
38
31
# 这条命令包含了测试和上传覆盖率
39
- - run : npm run coveralls
32
+ # - run: npm run coveralls
40
33
41
34
# 打包发布
42
35
- run : npm run build --if-present
43
- - run : npm publish
36
+ - name : Release
37
+ run : npm run release
44
38
env :
45
- NODE_AUTH_TOKEN : ${{ secrets.NPM_ALOVA_PUBLISH_TOKEN }}
39
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
40
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 30
30
"build:umd" : " cross-env NODE_ENV=development rollup -c ./config/rollup.config.umd.js" ,
31
31
"build:umd.min" : " cross-env NODE_ENV=production rollup -c ./config/rollup.config.umd.js" ,
32
32
"build" : " npm run clean && npm run build:esm && npm run build:umd && npm run build:umd.min" ,
33
- "release" : " npm publish" ,
34
- "coveralls" : " npm run test:coverage && coveralls < coverage/lcov.info"
33
+ "release" : " semantic-release --branches main" ,
34
+ "coveralls" : " npm run test:coverage && coveralls < coverage/lcov.info" ,
35
+ "commit" : " git add . && git-cz && git push"
35
36
},
36
37
"publishConfig" : {
37
38
"access" : " public"
64
65
"alova" : " ^2.0.4" ,
65
66
"axios" : " ^1.3.4" ,
66
67
"babel-jest" : " ^29.2.2" ,
68
+ "commitizen" : " ^4.3.0" ,
67
69
"coveralls" : " ^3.1.1" ,
68
70
"cross-env" : " 5.2.0" ,
71
+ "cz-conventional-changelog" : " ^3.3.0" ,
69
72
"eslint" : " ^8.35.0" ,
70
73
"eslint-config-prettier" : " ^8.6.0" ,
71
74
"eslint-plugin-prettier" : " ^4.2.1" ,
79
82
"rollup" : " ^2.74.1" ,
80
83
"rollup-plugin-terser" : " ^7.0.2" ,
81
84
"rollup-plugin-typescript2" : " ^0.31.2" ,
85
+ "semantic-release" : " ^21.0.1" ,
82
86
"ts-jest" : " ^29.0.3" ,
83
87
"ts-jest-mock-import-meta" : " ^1.0.0" ,
84
88
"ts-node" : " ^10.9.1" ,
85
89
"tslib" : " ^2.4.0" ,
86
90
"typescript" : " ^4.7.2" ,
87
91
"vue" : " ^3.2.47"
92
+ },
93
+ "config" : {
94
+ "commitizen" : {
95
+ "path" : " ./node_modules/cz-conventional-changelog"
96
+ }
88
97
}
89
98
}
You can’t perform that action at this time.
0 commit comments