Skip to content

Commit

Permalink
Add --provenance to npm publish command (#18)
Browse files Browse the repository at this point in the history
See the following links on this new supply chain security feature that
GitHub and npm offer.

- https://github.blog/2023-04-19-introducing-npm-package-provenance/
- https://docs.npmjs.com/generating-provenance-statements
  • Loading branch information
jgarber623 committed Oct 4, 2023
1 parent d92adc1 commit 004b1c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
uses: ./.github/workflows/ci.yml
publish-to-npm:
name: Publish to npm
permissions:
contents: read
id-token: write
needs: ci
runs-on: ubuntu-latest
steps:
Expand All @@ -21,7 +24,7 @@ jobs:
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run build
- run: npm publish
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-to-github-packages:
Expand Down

0 comments on commit 004b1c4

Please sign in to comment.