Skip to content

release: attest the sdist provenance, attach the bundle to the release - #56

Merged
ThomasWaldmann merged 1 commit into
mainfrom
attest-provenance
Aug 31, 2026
Merged

release: attest the sdist provenance, attach the bundle to the release#56
ThomasWaldmann merged 1 commit into
mainfrom
attest-provenance

Conversation

@ThomasWaldmann

Copy link
Copy Markdown
Member

The release workflow now generates a build provenance attestation for the sdist, saying that it was built by this workflow from this repository at this commit.

  • actions/attest-build-provenance runs after the "is the sdist installable" check, so that we never attest a broken sdist. Same pin as borg uses.
  • The release job gets id-token: write and attestations: write for it.
  • GitHub stores the attestation and serves it via the attestations API (that is what gh attestation verify uses by default), but the bundle is tiny, so the workflow also copies ${{ steps.attest.outputs.bundle-path }} to borghash-X.Y.Z.tar.gz.jsonl and attaches it to the GitHub release. Then the sdist can be verified against that file instead of the API, via gh attestation verify --bundle. .jsonl is how gh attestation download names such a file.
  • Release notes and the "Making a release" section of the README say how to verify.

Checked locally: the workflow file parses, the release-notes heredoc renders as intended with the added backtick-quoted commands, and dist/*.tar.gz dist/*.jsonl expands to exactly the two assets (the sdist glob does not pick up the bundle, and the PyPI artifact upload still takes only dist/*.tar.gz).

Not tested on a real tag push - that only happens at the next release.

The release workflow now generates a build provenance attestation for the
sdist, saying that it was built by this workflow from this repository. GitHub
serves it via the attestations API, and the attestation bundle is attached to
the GitHub release as borghash-X.Y.Z.tar.gz.jsonl, too, so that the sdist can
also be verified against that file:

    gh attestation verify --owner borgbackup borghash-X.Y.Z.tar.gz
@ThomasWaldmann
ThomasWaldmann merged commit 0c44fa5 into main Aug 31, 2026
3 checks passed
@ThomasWaldmann
ThomasWaldmann deleted the attest-provenance branch August 31, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant