Skip to content

feat: support pre-release tags in release pipeline#23

Merged
miguelsanchez-upsun merged 5 commits intomainfrom
cli-111-support-pre-release-tags-in-release-pipeline
Mar 11, 2026
Merged

feat: support pre-release tags in release pipeline#23
miguelsanchez-upsun merged 5 commits intomainfrom
cli-111-support-pre-release-tags-in-release-pipeline

Conversation

@pjcdawkins
Copy link
Contributor

@pjcdawkins pjcdawkins commented Mar 11, 2026

Summary

  • Tighten tag filter from v* to v[0-9]* with strict semver validation step
  • 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 tap and package repo uploads for testing
  • Validate tag format in both push and workflow_dispatch triggers
  • Set GORELEASER_CURRENT_TAG explicitly for deterministic workflow_dispatch builds

Pre-release tags (e.g. v5.10.0-rc1) are now safe by default. Stable releases are unchanged.

Channel Stable tag Pre-release tag (push) Pre-release (manual + overrides)
GitHub Release Full release Pre-release Pre-release
Cloudsmith Uploaded Skipped Skipped
Homebrew/Scoop Updated Skipped Updated (if upload_taps)
apt/yum/apk Uploaded Skipped Uploaded (if upload_repos)

🤖 Generated with Claude Code

pjcdawkins and others added 2 commits March 11, 2026 13:14
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>
Copilot AI review requested due to automatic review settings March 11, 2026 13:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_dispatch inputs 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.

pjcdawkins and others added 3 commits March 11, 2026 13:31
- 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>
@miguelsanchez-upsun miguelsanchez-upsun self-assigned this Mar 11, 2026
Copy link
Contributor

@miguelsanchez-upsun miguelsanchez-upsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miguelsanchez-upsun miguelsanchez-upsun merged commit 8ec2931 into main Mar 11, 2026
4 checks passed
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.

3 participants