Skip to content

Commit

Permalink
Enable Publish Attestation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
elliot-huffman authored and brettz9 committed Sep 18, 2024
1 parent e7ab475 commit 239d69a
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
name: Build and release

on:
push:
branches:
- main

permissions:
# Grant Permissions to the GH Token to capture attestation information from the GH agent
id-token: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: release
name: Release

steps:
- uses: pnpm/action-setup@v4
with:
Expand All @@ -21,8 +33,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Build and release
on:
push:
branches:
- main
NPM_CONFIG_PROVENANCE: true

0 comments on commit 239d69a

Please sign in to comment.