Skip to content

Commit d3b5e27

Browse files
authored
chore(ci): Add sigstore bundle to release (#4627)
Adding sigstore bundle to release, see https://github.com/ossf/scorecard/blob/main/docs/checks.md#signed-releases
1 parent ff39d4f commit d3b5e27

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,20 @@ jobs:
7474
for f in $(find . -name '*.zip'); do
7575
gh release upload $tag_name $f
7676
done
77+
- name: Attach attestation
78+
if: ${{ steps.release.outputs.releases_created == 'true' }}
79+
env:
80+
ATTESTATION_BUNDLE: ${{ steps.attest.outputs.bundle-path }}
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
TAG_NAME: ${{ steps.release.outputs.tag_name }}
83+
ATTESTATION_ID: ${{ steps.attest.outputs.attestation-id }}
84+
run: |
85+
# rename attest bundle to github-aws-runners-terraform-aws-github-runner-attestation-$attestation-id.sigstore
86+
# OpenSSF expects the attestation bundle to be named in this format (*.sigstore)
87+
SIGSTORE_BUNDLE=$RUNNER_TEMP/github-aws-runners-terraform-aws-github-runner-attestation-${ATTESTATION_ID}.sigstore
88+
mv ${ATTESTATION_BUNDLE} $SIGSTORE_BUNDLE
89+
if [ -z "$SIGSTORE_BUNDLE" ]; then
90+
echo "No attestation bundle found, skipping attachment."
91+
exit 0
92+
fi
93+
gh release upload $tag_name "$SIGSTORE_BUNDLE"

0 commit comments

Comments
 (0)