feat: support pre-release tags in release pipeline#23
Merged
miguelsanchez-upsun merged 5 commits intomainfrom Mar 11, 2026
Merged
Conversation
Pre-release tags (e.g. v5.10.0-rc1) are now handled safely: - Tighten tag filter from v* to v[0-9]+.[0-9]+.[0-9]+* (semver only) - Mark GitHub releases as pre-release via GoReleaser prerelease: auto - Skip Homebrew/Scoop tap updates for pre-releases (skip_upload: auto) - Skip Cloudsmith upload for pre-releases (Makefile hyphen check) - Skip package repo upload (repogen/S3) for pre-releases - Add workflow_dispatch with inputs to opt-in to Homebrew and package repo uploads for testing pre-releases - Validate tag format in both push and workflow_dispatch triggers Closes CLI-111 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Anchor the semver regex with $ and allow optional pre-release (-rc1) and build metadata (+build.123) suffixes per semver spec. - Use sed instead of grep -v to override skip_upload, replacing the value rather than removing the line. - Quote the sed command to avoid YAML parsing issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the release pipeline to treat semver pre-release tags (e.g., v5.10.0-rc1) as “safe by default” by marking GitHub releases as pre-releases and skipping downstream package/tap uploads unless explicitly overridden via manual dispatch.
Changes:
- Adds pre-release awareness to GoReleaser (
prerelease: auto) and skips Homebrew/Scoop uploads for pre-releases (skip_upload: auto). - Skips Cloudsmith upload for versions containing a hyphen (pre-release) in the Makefile.
- Extends the GitHub Actions release workflow with
workflow_dispatchinputs and conditional package repo uploads for stable vs. pre-release tags.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Makefile | Skips Cloudsmith upload when VERSION indicates a pre-release. |
| .goreleaser.yaml | Enables automatic pre-release GitHub releases and automatic skip behavior for tap uploads. |
| .github/workflows/release.yml | Adds manual release trigger/inputs, validates tags, checks out the resolved tag, and conditionally uploads packages/taps based on pre-release status and overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Rename upload_homebrew to upload_taps (also covers Scoop). - Rename upload_packages to upload_repos (clarity). - Improve descriptions to say "overrides pre-release skip". - Note in tag input description that the tag must already be pushed. - Set GORELEASER_CURRENT_TAG explicitly so goreleaser does not rely on git describe when triggered via workflow_dispatch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The tag filter uses fnmatch globs, not regex. The previous pattern v[0-9]+.[0-9]+.[0-9]+* treated + as a literal character and only matched single-digit version components. Use v[0-9]* (v followed by a digit) as a broad filter, and rely on the semver validation in the Resolve tag step for strict checking. Co-Authored-By: Claude Opus 4.6 (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.
Summary
v*tov[0-9]*with strict semver validation stepprerelease: autoskip_upload: auto)workflow_dispatchwith inputs to opt-in to tap and package repo uploads for testingworkflow_dispatchtriggersGORELEASER_CURRENT_TAGexplicitly for deterministicworkflow_dispatchbuildsPre-release tags (e.g.
v5.10.0-rc1) are now safe by default. Stable releases are unchanged.upload_taps)upload_repos)🤖 Generated with Claude Code