Skip to content

Commit b3823bf

Browse files
Add attestation url on release notes
1 parent bfb746c commit b3823bf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/release.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,20 @@ jobs:
6565

6666
- name: Attest artifacts
6767
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
68+
id: attest
6869
with:
6970
subject-checksums: ./dist/${{ github.event.repository.name }}_${{ fromJSON(steps.goreleaser.outputs.metadata).version }}_SHA256SUMS
71+
72+
- name: Update release notes with attestation
73+
run: |
74+
gh release view "${{ github.ref_name }}" --json body -q '.body' --repo "${{ github.repository }}" > new-release-notes.md
75+
echo "" >> new-release-notes.md
76+
echo "## Attestation" >> new-release-notes.md
77+
echo "" >> new-release-notes.md
78+
echo "Build provenance attestation: [View attestation](${{ steps.attest.outputs.attestation-url }})" >> new-release-notes.md
79+
echo "" >> new-release-notes.md
80+
echo "Verify the artifacts by running:" >> new-release-notes.md
81+
echo "\`\`\`bash" >> new-release-notes.md
82+
echo "gh attestation verify <artifact-file> --repo ${{ github.repository }}" >> new-release-notes.md
83+
echo "\`\`\`" >> new-release-notes.md
84+
gh release edit "${{ github.ref_name }}" --notes-file new-release-notes.md --repo "${{ github.repository }}"

0 commit comments

Comments
 (0)