Skip to content

Commit 6f169c1

Browse files
authored
chore: enable npm trusted publishing (#54)
1 parent f06d5a5 commit 6f169c1

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,32 @@ permissions:
1616
jobs:
1717
publish:
1818
runs-on: ubuntu-latest
19-
environment: production
19+
environment: npm
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v4
2323

24-
- name: Install Pnpm
25-
run: npm i -g corepack@latest --force && corepack enable
26-
2724
- name: Setup Node.js
2825
uses: actions/setup-node@v4
2926
with:
3027
node-version: 22
31-
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
3237
3338
- name: Install Dependencies
3439
run: pnpm install
3540

3641
- name: Publish
3742
uses: JS-DevTools/npm-publish@v3
3843
with:
39-
token: ${{ secrets.CREATE_RSTACK_NPM_TOKEN }}
44+
token: empty
4045

4146
- name: Create GitHub Release
4247
uses: ncipollo/release-action@v1

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"packageManager": "pnpm@10.12.4",
5858
"publishConfig": {
5959
"access": "public",
60-
"provenance": true,
6160
"registry": "https://registry.npmjs.org/"
6261
}
6362
}

0 commit comments

Comments
 (0)