Skip to content

Commit 673a0e0

Browse files
committed
ci(release): fix SLSA generator build issue, remove verification
1 parent 5ffb83d commit 673a0e0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/goreleaser.yaml renamed to .github/workflows/release.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,31 @@ jobs:
3333
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
3434
passphrase: ${{ secrets.PASSPHRASE }}
3535
- name: Run GoReleaser
36+
id: run-goreleaser
3637
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
3738
with:
3839
args: release --clean
3940
env:
4041
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4142
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
43+
44+
- name: Generate subject
45+
id: hash
46+
env:
47+
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}"
48+
run: |
49+
set -euo pipefail
50+
51+
checksum_file=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Checksum") | .path')
52+
echo "hashes=$(cat $checksum_file | base64 -w0)" >> "$GITHUB_OUTPUT"
53+
54+
provenance:
55+
needs: [goreleaser]
56+
permissions:
57+
actions: read # To read the workflow path.
58+
id-token: write # To sign the provenance.
59+
contents: write # To add assets to a release.
60+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0 # not pinned to avoid breaking it, use it to target refs/tags/vX.Y.Z
61+
with:
62+
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
63+
upload-assets: true # upload to a new release

0 commit comments

Comments
 (0)