Skip to content

ci: check the draft release's files before publishing (checksums, attestation, version, clean install) #200

Closed

Description

@groupsky

Why

The published files are checked only after they are public. release-please-config.json already has "draft": true, so release.yml can check the draft's files first and publish only when they pass.

What to build

A verify job in .github/workflows/release.yml, between build and publish:

  1. Download the draft's files (both tarballs, SHA256SUMS, the Sigstore bundle).
  2. SHA256SUMS matches each file; the names are the expected ones.
  3. The attestation verifies with the production identity (release.yml@refs/heads/main, as docs/releasing.md "Verify a download" says), offline with the bundle, and names the right files.
  4. The binary in each tarball prints the release version (arm64 under emulation, or by reading the build info).
  5. install.sh installs the draft's tarball in a clean container (debian:trixie), as root, with the same checks a user runs.

publish needs verify. When verify fails, the release stays a draft and nothing is public; docs/releasing.md says what to do then (look, fix, delete the draft and the tag, release again).

Done when

  • verify runs checks 1-5 and publish waits for it.
  • A test run shows that a broken file stops the publish (for example a workflow test on a fork or with a dry-run switch).
  • docs/releasing.md describes the gate and the steps after a failure.

Activity

  1. groupsky commented on Nov 18, 2026

    @groupsky
    ContributorAuthor

    A question on one point of this issue: "delete the draft and the tag, release again".

    The ruleset for v* tags does not let anybody delete a tag, not even the release App (docs/releasing.md, "Repository settings"). So in #216 the steps after a failed verify are: look, fix in a new fix: pull request, delete the draft release, and release again with the next version. The tag of the failed release stays.

    Do you want to keep it this way, or change the ruleset so that a maintainer can delete the tag of a release that was never published? I did not change the ruleset or the docs for this.

  2. groupsky commented on Nov 18, 2026

    @groupsky
    ContributorAuthor

    Done in #216 (merged). What each "Done when" box shows:

    • verify runs checks 1-5, and publish waits for it. Yes. release.yml now has upload → verify (read-only; verify-release.yml and scripts/verify-release.sh) → publish. publish needs the verified output of verify, so a skipped verify does not count. publish also checks that the draft still has the files that verify checked (the asset digests).
    • A test run shows that a broken file stops the publish. Yes, with the dry run of verify-release.yml on the published 0.7.0. Nothing was published.
    • docs/releasing.md describes the gate and the steps after a failure. Yes: "The verify gate" and "If build, upload, verify or publish fails". One difference from this issue: the tag stays, because the v* tag ruleset forbids deleting it. See my question above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions