Skip to content

fix(ci): fix release workflow branch protection and release notes range#122

Open
ricogu wants to merge 3 commits into
mainfrom
fix-release-workflow-branch-protection
Open

fix(ci): fix release workflow branch protection and release notes range#122
ricogu wants to merge 3 commits into
mainfrom
fix-release-workflow-branch-protection

Conversation

@ricogu

@ricogu ricogu commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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 the default-branch-protection ruleset (all-tests-passed required, never runs on a fresh release branch).

Instead: the @main@v{major} substitution commit is created as a detached commit via git 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: true auto-detects the previous tag by walking the git graph. Prior tags (v1.0.x) live on disconnected release branches, so GitHub falls back to v0.0.0 as 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:refname before pushing the new tag, and pass it explicitly as previous_tag_name to softprops/action-gh-release. This bypasses the git-graph walk entirely and always produces the correct v1.0.3...v1.1.0 range.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

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.
@ricogu ricogu requested a review from mdanish98 June 10, 2026 11:32
@ricogu ricogu enabled auto-merge (squash) June 11, 2026 15:20
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.

1 participant