From 41ba75103e7a6edb9b4006758a06a7e194dedb39 Mon Sep 17 00:00:00 2001 From: mayankpande88 Date: Sun, 6 Sep 2026 10:03:24 +0530 Subject: [PATCH] fix(release): do not mark prereleases as the latest release 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. --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 372c00f0..2dcfde56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,7 +92,13 @@ jobs: with: tag_name: ${{ github.ref_name }} name: ${{ github.ref_name }} - make_latest: true + # A prerelease must not become the repository's latest release, and + # must be flagged as one. v0.1.6-rc.1..rc.5 were all published with + # make_latest: true, so an RC has been presented as the latest release + # since. contains() on the tag is the check: v1.2.3 is a release, + # v1.2.3-rc.1 is not. + prerelease: ${{ contains(github.ref_name, '-') }} + make_latest: ${{ !contains(github.ref_name, '-') }} files: | /tmp/nudgebee-node-agent-${{ steps.meta.outputs.version }}-amd64 /tmp/nudgebee-node-agent-${{ steps.meta.outputs.version }}-arm64