Skip to content

Commit 239d69a

Browse files
elliot-huffmanbrettz9
authored andcommitted
Enable Publish Attestation
Enable provenance on the NPM publish command so that attestation data is available in the NPM public registry to reduce the risk of a supply chain attack.
1 parent e7ab475 commit 239d69a

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/main.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1+
name: Build and release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
# Grant Permissions to the GH Token to capture attestation information from the GH agent
10+
id-token: write
11+
112
jobs:
213
release:
14+
name: Release
315
runs-on: ubuntu-latest
416
environment: release
5-
name: Release
17+
618
steps:
719
- uses: pnpm/action-setup@v4
820
with:
@@ -21,8 +33,5 @@ jobs:
2133
env:
2234
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2335
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
24-
name: Build and release
25-
on:
26-
push:
27-
branches:
28-
- main
36+
NPM_CONFIG_PROVENANCE: true
37+

0 commit comments

Comments
 (0)