Skip to content

ci: size badge from the release asset, and let the release PR merge itself - #94

Merged
lmarkmann merged 3 commits into
mainfrom
size-badge
Sep 6, 2026
Merged

lmarkmann merged 3 commits into
mainfrom
size-badge

Conversation

@lmarkmann

Copy link
Copy Markdown
Owner

What changed

Binary size badge. The musl leg of release.yml now measures the binary it just archived and uploads a version-less size.json to the release; the README badge reads it through releases/latest/download/size.json as a shields dynamic/json badge (the endpoint type refuses github.com as a host). The third job, the orphan badges branch and the checkout-with-credentials are gone; the branch is already deleted and v0.8.0 carries a backfilled size.json so the badge renders before the next release.

Release PR auto-merge. release-plz.yml enables gh pr merge --auto --squash on the release PR it opens, using the existing PAT. The ruleset requires all six CI jobs, so the PR merges itself once they pass and merging a feature PR becomes the one irreversible step. To hold a release back, disable auto-merge on the release PR or convert it to a draft before CI finishes.

sha2 0.11. The dev-dependency bump Renovate proposed in #83, with the oracle's hex helper adapted to digest 0.11's output type.

Release

Cargo.toml and README are packaged, so this proposes 0.8.1. The release PR it produces is the first one that will merge itself, which is the test of the whole flow.

The size badge read size.json from a `badges` branch that every release
pushed a commit to, which meant a third job, a checkout with credentials
kept, and a branch whose only purpose was to be fetched by shields.io.
A release asset does the same job: the musl leg measures the binary it
just archived and uploads size.json to the release, and the README badge
reads it through releases/latest/download, which shields follows.
The release PR was the one step in the flow still waiting on a human,
and all it ever needed was green CI. release-plz exposes the number of
the PR it opened, the repository allows auto-merge, and the ruleset
requires every CI job, so arming auto-merge right after the PR is
opened turns a feature merge into a published crate with nothing to
babysit. The decision point moves to the feature PR merge, which is
where the changelog line is typed anyway.
@codspeed

codspeed Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 74 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing size-badge (5d9ae65) with main (ac21641)

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@lmarkmann
lmarkmann merged commit b84c881 into main Sep 6, 2026
8 checks passed
@lmarkmann
lmarkmann deleted the size-badge branch September 6, 2026 22:10
@lmarkmann lmarkmann mentioned this pull request Sep 6, 2026
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