File tree Expand file tree Collapse file tree 4 files changed +25
-303
lines changed
Expand file tree Collapse file tree 4 files changed +25
-303
lines changed Original file line number Diff line number Diff line change 1- name : Release Full
1+ # This action will publish the package to npm and create a GitHub release.
2+ name : Release
23
34on :
4- workflow_dispatch :
5- inputs :
6- tag :
7- type : choice
8- description : ' Release Npm Tag'
9- required : true
10- default : ' nightly'
11- options :
12- - alpha
13- - beta
14- - canary
15- - latest
16- - nightly
17- - rc
5+ # Run `npm run bump` to bump the version and create a git tag.
6+ push :
7+ tags :
8+ - ' v*'
189
19- dry_run :
20- type : boolean
21- description : ' DryRun release'
22- required : true
23- default : false
10+ workflow_dispatch :
2411
2512permissions :
2613 contents : write
27- # To publish packages with provenance
2814 id-token : write
2915
3016jobs :
31- release :
32- name : Release
33- environment : npm
17+ publish :
3418 runs-on : ubuntu-latest
35-
19+ environment : npm
3620 steps :
3721 - name : Checkout
38- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
39-
40- - name : Install Pnpm
41- run : npm i -g corepack@latest --force && corepack enable
22+ uses : actions/checkout@v6
4223
4324 - name : Setup Node.js
44- uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
25+ uses : actions/setup-node@v6
4526 with :
46- node-version : 24.14.1
47- cache : ' pnpm'
27+ node-version : 24
4828
49- # Update npm to the latest version to enable OIDC
50- - name : Update npm
29+ - name : Setup Package Managers
5130 run : |
52- npm install -g npm @latest
53- npm --version
31+ npm install -g corepack @latest --force
32+ corepack enable
5433
5534 - name : Install Dependencies
5635 run : pnpm install
5736
58- - name : Run Test
59- run : pnpm run test
60-
61- - name : Dry run release to npm
62- if : inputs.dry_run
63- run : node scripts/release.js --dry-run --tag ${{ inputs.tag }}
37+ - name : Publish
38+ uses : JS-DevTools/npm-publish@v4
39+ with :
40+ token : empty
6441
65- - name : Release to npm
66- if : ${{ !inputs.dry_run }}
67- run : node scripts/release.js --tag ${{ inputs.tag }}
42+ - name : Create GitHub Release
43+ uses : ncipollo/release-action@v1
44+ with :
45+ # TODO: remove beta tag before release stable
46+ tag : beta
47+ generateReleaseNotes : ' true'
Original file line number Diff line number Diff line change 3838 "@rspack/core" : " 2.0.0-rc.0" ,
3939 "@rstest/core" : " ^0.9.6" ,
4040 "@types/node" : " ^24.12.2" ,
41- "cac" : " ^7.0.0" ,
42- "execa" : " 9.6.1" ,
4341 "prettier" : " ^3.8.1" ,
4442 "react-refresh" : " ^0.18.0" ,
4543 "simple-git-hooks" : " ^2.13.1" ,
You can’t perform that action at this time.
0 commit comments