Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,10 @@ jobs:
# (source tarball and SBOM), signed keyless via Sigstore and stored in
# GitHub's attestation API. Verify with:
# gh attestation verify <artifact> -R adrianbrad/queue
# The bundle is not attached to the release: this repository uses
# immutable releases, which reject asset uploads once goreleaser has
# published. Fetch it with `gh attestation download` instead.
- name: Attest build provenance
id: attest
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-checksums: dist/checksums.txt

# Attach the Sigstore bundle to the release so the provenance can be
# verified offline (gh attestation verify --bundle) without API access.
- name: Upload provenance bundle to the release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUNDLE: ${{ steps.attest.outputs.bundle-path }}
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
name="queue-${TAG#v}.sigstore.json"
cp "$BUNDLE" "dist/$name"
gh release upload "$TAG" "dist/$name" --clobber
7 changes: 4 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ release:
gh attestation verify {{ .ProjectName }}-{{ .Version }}-source.tar.gz -R adrianbrad/queue
```

Or against the bundle attached to this release, without querying the
attestations API:
To verify offline later, download the attestation bundle once and verify
against it:

```bash
gh attestation download {{ .ProjectName }}-{{ .Version }}-source.tar.gz -R adrianbrad/queue
gh attestation verify {{ .ProjectName }}-{{ .Version }}-source.tar.gz \
-R adrianbrad/queue \
--bundle {{ .ProjectName }}-{{ .Version }}.sigstore.json
--bundle sha256:*.jsonl
```

changelog:
Expand Down
Loading