fix(ci): fix release workflow branch protection and release notes range#122
Open
ricogu wants to merge 3 commits into
Open
fix(ci): fix release workflow branch protection and release notes range#122ricogu wants to merge 3 commits into
ricogu wants to merge 3 commits into
Conversation
generate_release_notes auto-detects the previous tag by walking the git graph, but prior tags (v1.0.x) live on disconnected release branches so GitHub falls back to v0.0.0 as the range base. Capture the highest existing semver tag before pushing the new one and pass it explicitly as previous_tag_name to the release action.
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
Two fixes for the release workflow, both discovered from the v1.1.0 release run.
Changes Made
Fix 1: Bypass branch protection (commit
8b0027f)The workflow was pushing a
release/v*branch blocked by thedefault-branch-protectionruleset (all-tests-passedrequired, never runs on a fresh release branch).Instead: the
@main→@v{major}substitution commit is created as a detached commit viagit write-tree+git commit-tree(not on any branch, not subject to branch protection). Only tags are pushed —refs/tags/*are not covered by the ruleset.Fix 2: Correct release notes range (commit
5a67baf)generate_release_notes: trueauto-detects the previous tag by walking the git graph. Prior tags (v1.0.x) live on disconnected release branches, so GitHub falls back tov0.0.0as the base — producing a release notes diff of the entire project history instead of just the changes since the last release.Fix: capture the highest existing semver tag with
git tag --sort=-version:refnamebefore pushing the new tag, and pass it explicitly asprevious_tag_nametosoftprops/action-gh-release. This bypasses the git-graph walk entirely and always produces the correctv1.0.3...v1.1.0range.Type of Change