ci: size badge from the release asset, and let the release PR merge itself - #94
Merged
Merged
Conversation
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.
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Binary size badge. The musl leg of
release.ymlnow measures the binary it just archived and uploads a version-lesssize.jsonto the release; the README badge reads it throughreleases/latest/download/size.jsonas a shieldsdynamic/jsonbadge (theendpointtype refuses github.com as a host). The third job, the orphanbadgesbranch and the checkout-with-credentials are gone; the branch is already deleted and v0.8.0 carries a backfilledsize.jsonso the badge renders before the next release.Release PR auto-merge.
release-plz.ymlenablesgh pr merge --auto --squashon 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.