Skip to content

Commit 9e2decc

Browse files
authored
chore: enable npm trusted publishing (#33)
1 parent 3836d43 commit 9e2decc

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,38 @@ on:
1010
workflow_dispatch:
1111

1212
permissions:
13-
# Provenance generation in GitHub Actions requires "write" access to the "id-token"
14-
id-token: write
15-
# `ncipollo/release-action` requires "write" access to the "contents"
1613
contents: write
14+
id-token: write
1715

1816
jobs:
1917
publish:
2018
runs-on: ubuntu-latest
21-
environment: production
19+
environment: npm
2220
steps:
2321
- name: Checkout
2422
uses: actions/checkout@v4
2523

26-
- name: Install Pnpm
27-
run: |
28-
npm install -g corepack@latest --force
29-
corepack enable
30-
3124
- name: Setup Node.js
3225
uses: actions/setup-node@v4
3326
with:
3427
node-version: 22
35-
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
3637
3738
- name: Install Dependencies
3839
run: pnpm install
3940

4041
- name: Publish
4142
uses: JS-DevTools/npm-publish@v3
4243
with:
43-
token: ${{ secrets.TS_CHECKER_RSPACK_PLUGIN_NPM_TOKEN }}
44+
token: empty
4445

4546
- name: Create GitHub Release
4647
uses: ncipollo/release-action@v1

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
},
7777
"publishConfig": {
7878
"access": "public",
79-
"provenance": true,
8079
"registry": "https://registry.npmjs.org/"
8180
},
8281
"packageManager": "[email protected]"

0 commit comments

Comments
 (0)