ci(release): guard prerelease tags from clobbering :latest / Homebrew#76
Merged
Conversation
…table
A v*-rc* tag triggered the same release pipeline as a stable tag, which
would publish a normal release, overwrite ghcr.io/0xmassi/webclaw:latest,
and repoint the Homebrew formula at the rc — shipping a prerelease to every
stable Docker/brew user. Guard all three on the SemVer prerelease hyphen:
- release: add --prerelease for hyphenated tags
- docker: still push :${tag} (testable rc image) but only move :latest for stable
- homebrew: skip entirely for prereleases
Lets us cut rc tags (e.g. to validate the new musl build job) without
touching stable users.
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Prep for cutting validation rc tags (e.g. to exercise the new musl build job from #75) without shipping an rc to stable users.
Problem
Any
v*tag runs the full release pipeline. For a prerelease likev0.6.14-rc1that meant:ghcr.io/0xmassi/webclaw:latestoverwritten with the rc image,brew install webclawgets it).Fix
Guard all three on the SemVer prerelease hyphen (
v1.2.3-rc1contains-):--prereleasefor hyphenated tags.:${tag}(so the rc image is testable) but only move:latestfor stable tags.Stable tags (
v0.6.14) are unaffected — verified the shell hyphen-detection both ways. Pure CI change; the build/test jobs are untouched.