diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56e667269c..2bf7658772 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: goreleaser on: push: tags: - - '*' + - "*" jobs: goreleaser: @@ -59,14 +59,13 @@ jobs: provenance: needs: [goreleaser] permissions: - actions: read # To read the workflow path. + actions: read # To read the workflow path. id-token: write # To sign the provenance. contents: write # To add assets to a release. uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.5.0 with: base64-subjects: "${{ needs.goreleaser.outputs.hashes }}" upload-assets: true - compile-generator: true # Workaround for https://github.com/slsa-framework/slsa-github-generator/issues/1163 verification: needs: [goreleaser, provenance] @@ -93,11 +92,12 @@ jobs: - name: Download assets env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PROVENANCE: "${{ needs.provenance.outputs.attestation-name }}" run: | set -euo pipefail gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "*.tar.gz" - gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "attestation.intoto.jsonl" + gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "$PROVENANCE" - name: Verify assets env: