Skip to content

Commit ba70428

Browse files
authored
feat: add npm provenance (#398)
related to: netlify/pod-dev-foundations#490
1 parent 1393df1 commit ba70428

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/pre-release.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
jobs:
88
prerelease:
99
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
contents: write
1013
steps:
1114
- uses: actions/checkout@v3
1215
- uses: actions/setup-node@v3
@@ -37,7 +40,7 @@ jobs:
3740
run: npm version ${{ steps.extract.outputs.version }}-${{ steps.extract.outputs.tag }}
3841
- name: Push changes
3942
run: git push --follow-tags
40-
- name: Run npm publish
43+
- name: Run npm publish --provenance
4144
run: npm publish --tag=${{ steps.extract.outputs.tag }}
4245
env:
4346
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/release-please.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
jobs:
77
release-please:
88
runs-on: ubuntu-latest
9+
permissions:
10+
id-token: write
11+
contents: write
12+
pull-requests: write
913
steps:
1014
- uses: navikt/github-app-token-generator@a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
1115
id: get-token
@@ -28,7 +32,7 @@ jobs:
2832
check-latest: true
2933
registry-url: 'https://registry.npmjs.org'
3034
if: ${{ steps.release.outputs.release_created }}
31-
- run: npm publish
35+
- run: npm publish --provenance
3236
if: ${{ steps.release.outputs.release_created }}
3337
env:
3438
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"keywords": [],
4545
"license": "MIT",
46-
"repository": "netlify/functions",
46+
"repository": "https://github.com/netlify/functions",
4747
"bugs": {
4848
"url": "https://github.com/netlify/functions/issues"
4949
},

0 commit comments

Comments
 (0)