Skip to content

Commit a46b3f9

Browse files
committed
Update workflow for npm OIDC trusted publishing with provenance
1 parent 2eb6a1a commit a46b3f9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/prebuild.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ jobs:
6767
runs-on: ubuntu-latest
6868
if: startsWith(github.ref, 'refs/tags/v')
6969

70+
# Required for npm OIDC trusted publishing
71+
permissions:
72+
contents: read
73+
id-token: write
74+
7075
steps:
7176
- uses: actions/checkout@v4
7277

@@ -95,7 +100,7 @@ jobs:
95100
- name: Build TypeScript
96101
run: npm run build:ts
97102

98-
- name: Publish to npm
99-
run: npm publish --access public
103+
- name: Publish to npm with provenance
104+
run: npm publish --access public --provenance
100105
env:
101106
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)