File tree Expand file tree Collapse file tree 5 files changed +335
-246
lines changed
Expand file tree Collapse file tree 5 files changed +335
-246
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+ name : Npm Package
5+
6+ on :
7+ release :
8+ types : [created]
9+ push :
10+ branches :
11+ - main
12+ tags :
13+ - " *"
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+ - uses : actions/setup-node@v4
21+ with :
22+ node-version : 20
23+
24+ publish-npm :
25+ needs : build
26+ runs-on : ubuntu-latest
27+ concurrency :
28+ group : ${{ github.workflow }}-${{ github.ref }}
29+ steps :
30+ - name : Checkout
31+ uses : actions/checkout@v4
32+
33+ - name : Setup Node
34+ uses : actions/setup-node@v4
35+ with :
36+ node-version : 20
37+ registry-url : https://registry.npmjs.org/
38+
39+ - name : Install pnpm
40+ uses : pnpm/action-setup@v2
41+ with :
42+ version : 7
43+
44+ - name : Install & Publish
45+ run : |
46+ pnpm -v
47+ pnpm i
48+ pnpm run publish-changed
49+ env :
50+ NODE_AUTH_TOKEN : ${{secrets.NPM_CHAOS_TOKEN}}
Original file line number Diff line number Diff line change 131131.pnp. *
132132
133133# for get changed pkg path
134- cache-changed-pkg-path .sh
134+ cache-changed- * .sh
Original file line number Diff line number Diff line change 2222 "getchanged" : " sh ./scripts/get-changed-pkg-path.sh" ,
2323 "release-all" : " bumpp packages/**/package.json" ,
2424 "release" : " bumpp packages/**/package.json packages/**/*/package.json" ,
25+ "publish-changed" : " npm run getchanged && chmod +x ./cache-changed-pkg-publish-path.sh" ,
26+ "prepublishOnly" : " pnpm run build" ,
2527 "publish-pkg" : " sh ./scripts/publish-to-npm.sh" ,
2628 "prepare" : " husky"
2729 },
4547 "lint-staged" : {
4648 "*" : [
4749 " prettier --write --cache --ignore-unknown" ,
48- " npm run generate-packages-info" ,
50+ " pnpm run generate-packages-info" ,
4951 " pnpm run getchanged" ,
5052 " git add ."
5153 ],
You can’t perform that action at this time.
0 commit comments