Skip to content

Commit c9d9da3

Browse files
authoredMar 22, 2024
ci: add provenance to insider packages (#154)
This commit adds provenance for insider packages. See the NPM documentation [0]. Provenance will allow people to verify that the packages were actually built on GH Actions and with the content of the corresponding commit. This will help with supply chain security. For this to work, the `id-token` permission was added only where necessary. [0]: https://docs.npmjs.com/generating-provenance-statements
1 parent e6bcd1f commit c9d9da3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎.github/workflows/release-insiders.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
branches: [master]
66

7+
permissions:
8+
contents: read
9+
id-token: write
10+
711
jobs:
812
build:
913
runs-on: ubuntu-latest
@@ -40,11 +44,11 @@ jobs:
4044
id: vars
4145
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
4246

43-
- name: "Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}"
47+
- name: 'Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}'
4448
run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version
4549

4650
- name: Publish
47-
run: npm publish --tag insiders
51+
run: npm publish --provenance --tag insiders
4852
env:
4953
CI: true
5054
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)
Failed to load comments.