Skip to content

Commit

Permalink
ci: setup npm provenance (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxken authored Mar 18, 2024
1 parent 4bf8a76 commit 7552b80
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/npm-provenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# https://docs.npmjs.com/generating-provenance-statements

name: Publish Package to npmjs
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm
- run: npm ci
- run: npm publish --provenance public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-lock=false
provenance=true

0 comments on commit 7552b80

Please sign in to comment.