File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 11# This action will publish the package to npm and create a GitHub release.
2+ # Ref: https://docs.npmjs.com/trusted-publishers/
23name : Release
34
45on :
@@ -16,27 +17,32 @@ permissions:
1617jobs :
1718 publish :
1819 runs-on : ubuntu-latest
20+ environment : npm
1921 steps :
2022 - name : Checkout
2123 uses : actions/checkout@v4
2224
23- - name : Install Pnpm
24- run : npm i -g corepack@latest --force && corepack enable
25-
2625 - name : Setup Node.js
2726 uses : actions/setup-node@v4
2827 with :
2928 node-version : 22
30- cache : " pnpm"
29+
30+ # Update npm to the latest version to enable OIDC
31+ # Use corepack to install pnpm
32+ - name : Setup Package Managers
33+ run : |
34+ npm install -g npm@latest
35+ npm --version
36+ npm install -g corepack@latest --force
37+ corepack enable
3138
3239 - name : Install Dependencies
3340 run : pnpm install
3441
3542 - name : Publish
3643 uses : JS-DevTools/npm-publish@v3
3744 with :
38- token : ${{ secrets.NPM_TOKEN }}
39- provenance : true
45+ token : empty
4046
4147 - name : Create GitHub Release
4248 uses : ncipollo/release-action@v1
You can’t perform that action at this time.
0 commit comments