Skip to content

fix(release): do not mark prereleases as the latest release - #321

Merged
blue4209211 merged 1 commit into
mainfrom
fix/no-latest-on-prerelease
Sep 6, 2026
Merged

fix(release): do not mark prereleases as the latest release#321
blue4209211 merged 1 commit into
mainfrom
fix/no-latest-on-prerelease

Conversation

@mayankpande88

Copy link
Copy Markdown
Contributor

Problem

release.yml sets make_latest: true for every tag, so each of v0.1.6-rc.1rc.5 claimed the repository's latest release in turn. An RC is currently shown as the latest release.

That is wrong for anyone reading the releases page or resolving "latest" programmatically, and the ordering stays wrong even after v0.1.6 is cut.

Fix

Derive both flags from the tag shape:

prerelease:  ${{ contains(github.ref_name, '-') }}
make_latest: ${{ !contains(github.ref_name, '-') }}

v1.2.3 is a release; v1.2.3-rc.1 is a prerelease. This matches the semver convention docker/metadata-action already relies on in the same job — it skips the mutable {{major}}.{{minor}} and {{major}} tags for prereleases, which is why the RCs correctly never moved 0.1/0/latest on the image side. This brings the GitHub release side in line with that.

Why now

v0.1.6 is ready to cut after ~20h of soak on dev. Cutting it while an RC holds "latest" would leave the releases page misleading, so this should land first.

YAML validated. No behaviour change for real releases.

Every tag published with make_latest: true unconditionally, so v0.1.6-rc.1
through rc.5 each claimed the repository's latest release in turn. An RC is
currently presented as the latest release, which is wrong for anyone reading
the releases page or resolving 'latest' programmatically, and it would remain
wrong in ordering terms even after v0.1.6 is cut.

Derives both flags from the tag: a hyphen means prerelease (v1.2.3-rc.1),
its absence means a real release (v1.2.3). Matches the semver convention the
existing docker/metadata-action tags already rely on.
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@blue4209211
blue4209211 merged commit 63cebe0 into main Sep 6, 2026
7 checks passed
@blue4209211
blue4209211 deleted the fix/no-latest-on-prerelease branch September 6, 2026 04:41
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.

2 participants