Skip to content

Commit c02a1a4

Browse files
authored
Add provenance to npm package (#52)
1 parent 1df2b4f commit c02a1a4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/npm-publish.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ on:
1818
jobs:
1919
NPM:
2020
runs-on: ubuntu-latest
21+
22+
# https://docs.npmjs.com/generating-provenance-statements#example-github-actions-workflow
23+
permissions:
24+
contents: read
25+
id-token: write
26+
2127
steps:
2228
- uses: actions/checkout@v4
2329
- uses: actions/setup-node@v4
@@ -31,7 +37,7 @@ jobs:
3137
run: |
3238
VERSION="$(npm version "${{ github.event.inputs.Version }}")"
3339
echo "VERSION=$VERSION" >> $GITHUB_ENV
34-
- run: npm publish
40+
- run: npm publish --provenance
3541
env:
3642
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3743
- run: git push --follow-tags

0 commit comments

Comments
 (0)