Skip to content

Commit 53c620d

Browse files
authored
chore: Publish to NPM with provenance (#91)
The release process in this repository is already automated via GitHub Actions, which is a great first step toward creating trust in the supply chain. Recently, NPM has started to support publishing with the `--provenance` flag. This flag creates a link between the GitHub Actions run that created the release and the final artifact on NPM. This linkage further ensures that package installs can be traced back to a specific code revision. For more information on publishing with provenance, please refer to: https://github.blog/2023-04-19-introducing-npm-package-provenance/
1 parent 5c0519b commit 53c620d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
jobs:
99
release:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
1114
steps:
1215
- name: Checkout Code
1316
uses: actions/checkout@v3
@@ -19,7 +22,7 @@ jobs:
1922
env:
2023
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
2124
- run: npm run build
22-
- run: npm publish --access public
25+
- run: npm publish --access public --provenance
2326
env:
2427
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2528

0 commit comments

Comments
 (0)