File tree Expand file tree Collapse file tree 2 files changed +6
-27
lines changed
Expand file tree Collapse file tree 2 files changed +6
-27
lines changed Original file line number Diff line number Diff line change 2323 ls -al
2424 pnpm i
2525 pnpm build
26- - name : Upload Build Artifacts
27- uses : actions/upload-artifact@v4
28- with :
29- name : build-artifacts # 构建产物名称
30- path : ./dist # 构建产物路径
31-
32- publish-npm :
33- needs : build
34- runs-on : ubuntu-latest
35- steps :
36- - name : Checkout repository
37- uses : actions/checkout@v4
38- - name : Set up Node.js
39- uses : actions/setup-node@v4
40- with :
41- node-version : 20
42- registry-url : https://registry.npmjs.org/
43- - name : Download Build Artifacts
44- uses : actions/download-artifact@v4
45- with :
46- name : build-artifacts # 构建产物名称,需与上传时的名称一致
47- path : ./ # 下载后存放路径
48- - name : List Build Directory
49- run : ls -al ./
26+ npm publish
5027 - name : Publish to NPM
5128 run : npm publish
5229 env :
Original file line number Diff line number Diff line change 1212 " CHANGELOG.md"
1313 ],
1414 "scripts" : {
15- "prepare" : " husky" ,
15+ "prepare" : " is-ci || husky" ,
1616 "commit" : " git-cz" ,
1717 "lint" : " eslint src/**/*.ts --fix" ,
1818 "lint:check" : " eslint src/**/*.ts" ,
2222 "release" : " semantic-release --no-ci" ,
2323 "release:ci" : " semantic-release" ,
2424 "dev" : " rollup -c -w" ,
25- "lint-staged" : " lint-staged"
25+ "lint-staged" : " lint-staged" ,
26+ "prepublishOnly" : " npm run build --no-git-hooks"
2627 },
2728 "keywords" : [
2829 " websocket" ,
6364 "rollup-plugin-delete" : " ^3.0.1" ,
6465 "semantic-release" : " ^24.2.3" ,
6566 "tslib" : " ^2.8.1" ,
66- "typescript-eslint" : " ^8.31.0"
67+ "typescript-eslint" : " ^8.31.0" ,
68+ "is-ci" : " ^3.0.1"
6769 }
6870}
You can’t perform that action at this time.
0 commit comments