Skip to content

Commit 2e21a87

Browse files
authored
chore: enable npm trusted publishing (#24)
1 parent 9710d55 commit 2e21a87

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,32 @@ permissions:
1616
jobs:
1717
publish:
1818
runs-on: ubuntu-latest
19+
environment: npm
1920
steps:
2021
- name: Checkout
2122
uses: actions/checkout@v4
2223

23-
- name: Install Pnpm
24-
run: npm i -g corepack@latest --force && corepack enable
25-
2624
- name: Setup Node.js
2725
uses: actions/setup-node@v4
2826
with:
2927
node-version: 22
30-
cache: "pnpm"
28+
29+
# Update npm to the latest version to enable OIDC
30+
# Use corepack to install pnpm
31+
- name: Setup Package Managers
32+
run: |
33+
npm install -g npm@latest
34+
npm --version
35+
npm install -g corepack@latest --force
36+
corepack enable
3137
3238
- name: Install Dependencies
3339
run: pnpm install
3440

3541
- name: Publish
3642
uses: JS-DevTools/npm-publish@v3
3743
with:
38-
token: ${{ secrets.RSBUILD_PLUGIN_NPM_TOKEN }}
44+
token: empty
3945

4046
- name: Create GitHub Release
4147
uses: ncipollo/release-action@v1

0 commit comments

Comments
 (0)