Skip to content

Commit 8310c45

Browse files
fix: update package configuration to publish provenance data (#1652)
* fix: update package configuration to publish provenance data * Move signature audit and permission configuration to the correct job.
1 parent cf4c99b commit 8310c45

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/nodejs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,12 @@ jobs:
380380
if: ${{ github.event_name == 'push' }}
381381
runs-on: ubuntu-latest
382382

383+
permissions:
384+
contents: write # to be able to publish a GitHub release
385+
issues: write # to be able to comment on released issues
386+
pull-requests: write # to be able to comment on released pull requests
387+
id-token: write # to enable use of OIDC for npm provenance
388+
383389
steps:
384390
- uses: actions/[email protected]
385391

@@ -391,6 +397,9 @@ jobs:
391397

392398
- run: npm ci
393399

400+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
401+
run: npm audit signatures
402+
394403
- env:
395404
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
396405
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ jobs:
88
release:
99
name: Release
1010
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write # to be able to publish a GitHub release
13-
issues: write # to be able to comment on released issues
14-
pull-requests: write # to be able to comment on released pull requests
15-
id-token: write # to enable use of OIDC for npm provenance
1611
steps:
1712
- uses: actions/[email protected]
1813

@@ -21,8 +16,6 @@ jobs:
2116
with:
2217
node-version: 18
2318
cache: 'npm'
24-
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
25-
run: npm audit signatures
2619
- name: Tag latest release
2720
run: |
2821
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"node": ">=18"
3939
},
4040
"publishConfig": {
41-
"tag": "next"
41+
"tag": "next",
42+
"provenance": true
4243
},
4344
"dependencies": {
4445
"@azure/core-auth": "^1.7.2",

0 commit comments

Comments
 (0)