From fcb66cc44ebbfd13340899e99b688127a8386c17 Mon Sep 17 00:00:00 2001 From: Julian Goldstein Date: Fri, 19 Jun 2026 14:53:29 -0500 Subject: [PATCH] ci: make the newest version GitHub-Latest; drop the rolling 'latest' release The manually-maintained rolling 'latest' release duplicated GitHub's built-in Latest and fought it for the badge (so the newest version was never Latest). Drop the delete/recreate step and mark each mainline release --latest instead; .../releases/latest/download/ now resolves to the newest version. release/* back-ports publish --latest=false so they can't steal Latest from a newer mainline release. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 24 ++++++++---------------- README.md | 7 ++++--- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3823764..fbd1c19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,23 +117,15 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | + # Mark the newest MAINLINE version as GitHub "Latest" so the stable + # .../releases/latest/download/ URL tracks it (no separate + # rolling "latest" release — GitHub's built-in Latest is the single + # source of truth). A release/* back-port must NOT steal Latest from a + # newer mainline release, so it publishes with --latest=false. + if [ "${GITHUB_REF_NAME}" = master ]; then mk=--latest; else mk='--latest=false'; fi gh release create "${{ steps.version.outputs.tag }}" \ "${{ steps.archive.outputs.asset }}" \ --title "${{ steps.version.outputs.tag }}" \ --notes "Repo snapshot of ${GITHUB_SHA}" \ - --target "${GITHUB_SHA}" - - - name: Update rolling "latest" release - # Only mainline moves "latest"; a release/* back-patch must not hijack - # the stable URL away from the newest master build. - if: steps.version.outputs.skip != 'true' && github.ref_name == 'master' - env: - GH_TOKEN: ${{ github.token }} - run: | - # Move the rolling "latest" tag/release to this commit so the - # stable .../releases/latest/download/ URL tracks the newest build. - gh release delete latest --yes --cleanup-tag || true - gh release create latest "${{ steps.archive.outputs.asset }}" \ - --title "latest" \ - --notes "Repo snapshot of ${GITHUB_SHA} (${{ steps.version.outputs.tag }})" \ - --target "${GITHUB_SHA}" + --target "${GITHUB_SHA}" \ + "$mk" diff --git a/README.md b/README.md index b51c301..5170c6c 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ make sync-toolchain TOOLCHAIN_TAG=v0.8.0 # one rebase-mergeable commit; ope ## Releasing -Every push to `master` publishes a versioned snapshot release and moves the -rolling **`latest`** release (so `.../releases/latest/download/` always tracks -the newest build). Versions are semver `vMAJOR.MINOR.PATCH`; CI picks the bump +Every push to `master` publishes a versioned snapshot release and marks it +GitHub **"Latest"**, so `.../releases/latest/download/` always tracks the +newest build (no separate rolling tag — GitHub's built-in Latest is the single +source of truth). Versions are semver `vMAJOR.MINOR.PATCH`; CI picks the bump from a `[bump:LEVEL]` marker in the commit **subject** (the body is free prose — put the marker on the subject line, like `[skip ci]`; for squash merges that's the PR title):