Skip to content

Commit

Permalink
feat: add npm package provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
theoludwig committed May 13, 2023
1 parent e818556 commit 3d24ffe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
jobs:
release:
runs-on: 'ubuntu-latest'
permissions:
contents: 'write'
issues: 'write'
pull-requests: 'write'
id-token: 'write'
steps:
- uses: 'actions/checkout@v3.5.2'
with:
Expand All @@ -27,6 +32,9 @@ jobs:

- run: 'npm run build:typescript'

- name: 'Verify the integrity of provenance attestations and registry signatures for installed dependencies'
run: 'npm audit signatures'

- name: 'Release'
run: 'npm run release'
env:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
save-exact=true
provenance=true
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
],
"main": "build/index.js",
"bin": "build/index.js",
"files": [
"build"
],
"publishConfig": {
"access": "public",
"provenance": true
},
"engines": {
"node": ">=16.0.0",
"npm": ">=9.0.0"
},
"files": [
"build"
],
"scripts": {
"build": "rimraf ./build && swc ./src --out-dir ./build",
"build:typescript": "tsc",
Expand Down

0 comments on commit 3d24ffe

Please sign in to comment.