fix(ci): prevent maintenance branch releases from being marked latest - #2241
Merged
Conversation
Fixes two bugs in the release workflow when deploying from maintenance branches (e.g. v3): 1. v3 releases were being marked as "latest" on GitHub, displacing the actual latest v4.x release. Added a post-release step that uses `gh release edit --latest=false` for non-main branches. 2. Wheel and attestation artifacts were uploaded to the wrong release (v4.x instead of v3.x). Fixed by passing explicit `tag` input to upload-to-gh-release action. Root causes: - python-semantic-release v10.5.3 doesn't expose make_latest parameter - upload-to-gh-release defaults to auto-detecting latest tag globally Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Chris Butler <chris.butler@redhat.com>
6 tasks
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
Fixes two bugs in the release workflow when deploying from maintenance branches (e.g. v3):
Changes
1. Added post-release step to un-mark non-main releases as latest
gh release edit --latest=falsefor non-main branch releases2. Pass explicit
tagto upload-to-gh-release actiontag: ${{ steps.release.outputs.tag }}inputRoot Causes
python-semantic-releasev10.5.3 doesn't expose amake_latestparameter, so GitHub API defaults to marking every new release as "latest"upload-to-gh-releasewithout explicittagruns semantic-release internally, finds v4.0.3 as the globally highest tag, and uploads artifacts thereTesting Plan
After merge to main and cherry-pick to v3:
fix:commit to v3 branch)Related Issues
Addresses the maintenance branch release issues reported in the initial investigation.
🤖 Generated with Claude Code