ci: keep Latest on the highest stable release - #272
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
The
unmark-latestjob turned out to be a no-op:PATCH make_latest=falsedoes not demote a release that has already taken the Latest badge — verified live on v2.0.3 today (job green, badge unmoved). Right now that is harmless, even correct: v3 only has prereleases (which cannot hold Latest), so v2.0.3 genuinely is the newest stable. But the job exists for the case after 3.0.0 GA, where a v2 patch would steal the badge from v3 — and there it would silently fail.Replaced with an
ensure-latestjob that asserts the badge in the direction that provably works (make_latest=true):vX.Y.Ztags;max_by, not creation date);PATCH make_latest=trueon the highest one, which re-points the badge (the v2 patch is demoted implicitly, since only one release can be Latest).Version-ordered rather than v3-hardcoded, so it also covers future lines (e.g. a v3 patch after a v4 GA).
Testing
v2.0.3today (= the just-created release → no-op path, correct), and would return the v3 GA tag once one exists.make_latest=falseon an already-latest release is today's observed behavior, not speculation.Checklist
.changeset(N/A — release-please)🤖 Generated with Claude Code