File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # .github/workflows/release.yml
21name : Release
32
43on :
54 release :
65 types : [published]
7- workflow_dispatch :
6+
7+ permissions :
8+ contents : read
9+ id-token : write
810
911jobs :
10- release :
12+ publish :
1113 runs-on : ubuntu-latest
12- permissions :
13- id-token : write
14- contents : read
15- packages : write
14+
1615 steps :
1716 - uses : actions/checkout@v6
1817
19- # 发布到 NPM Registry
20- - name : Setup Node.js for NPM
21- uses : actions/setup-node@v6
18+ - uses : actions/setup-node@v6
2219 with :
2320 node-version : 24
24- registry-url : ' https://registry.npmjs.org'
25- - run : npm install
26- - name : Publish to NPM
27- run : npm publish --access public
21+ cache : npm
2822
29- # 发布到 GitHub Packages
30- - name : Setup Node.js for GitHub Packages
31- uses : actions/setup-node@v6
32- with :
33- node-version : 24
34- registry-url : ' https://npm.pkg.github.com'
35- - name : Publish to GitHub Packages
36- run : npm publish --access public
37- env :
38- NODE_AUTH_TOKEN : ${{ github.token }}
23+ - run : npm ci
24+
25+ - run : npm publish --access public
You can’t perform that action at this time.
0 commit comments