Skip to content

Commit ceddf6e

Browse files
authored
Merge pull request #334 from github/dg/publish-provenance
Publish to npm with provenance
2 parents 9d11c4e + 1c834bd commit ceddf6e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
id-token: write # for provenance and publish access
10+
711
jobs:
812
publish-npm:
913
runs-on: ubuntu-latest
@@ -21,6 +25,4 @@ jobs:
2125
- run: npm version ${TAG_NAME} --git-tag-version=false
2226
env:
2327
TAG_NAME: ${{ github.event.release.tag_name }}
24-
- run: npm whoami; npm publish
25-
env:
26-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
28+
- run: npm publish --provenance

0 commit comments

Comments
 (0)