Skip to content

Commit d397ab4

Browse files
chore(ci): migrate to trusted publishing
Instead of using a token, npm now recommends using trusted publishing. This must be configured via npmjs.com under this package's settings. GitHub will automatically perform OIDC authentication, and it will also generate and publish provenance attestations.
1 parent 41929a2 commit d397ab4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
permissions:
1818
contents: read
19-
id-token: write
19+
id-token: write # Required for OIDC
2020

2121
steps:
2222
- name: Checkout
@@ -37,9 +37,8 @@ jobs:
3737
- name: Build
3838
run: yarn build
3939

40-
- name: Publish
41-
run: |
42-
npm install -g npm@latest
43-
npm publish --provenance
44-
env:
45-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
- name: Update npm
41+
run: npm install -g npm@latest
42+
43+
- name: Trusted Publish with Provenance
44+
run: npm publish

0 commit comments

Comments
 (0)