Skip to content

Commit 105ca4d

Browse files
authored
Merge pull request #4150 from manugupt1/provenance
Add provenance from github actions
2 parents d5f9634 + b5d5f2f commit 105ca4d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
release:
1414
runs-on: ubuntu-24.04
1515
timeout-minutes: 40
16+
# The maximum access is "read" for PRs from public forked repos
17+
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
18+
permissions:
19+
contents: write # for releases
20+
id-token: write # for provenances
21+
attestations: write # for provenances
1622
steps:
1723
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1824
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
@@ -39,6 +45,11 @@ jobs:
3945
- - -
4046
Release manager: [ADD YOUR NAME HERE] (@[ADD YOUR GITHUB ID HERE])
4147
EOF
48+
- name: "Generate artifact attestation"
49+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
50+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
51+
with:
52+
subject-path: _output/*
4253
- name: "Create release"
4354
env:
4455
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)