Skip to content

fix: handle pre-existing releases and protected branch pushes in CI [3.x]#111

Merged
ManukMinasyan merged 1 commit into3.xfrom
fix/ci-release-changelog-3x
Mar 17, 2026
Merged

fix: handle pre-existing releases and protected branch pushes in CI [3.x]#111
ManukMinasyan merged 1 commit into3.xfrom
fix/ci-release-changelog-3x

Conversation

@ManukMinasyan
Copy link
Copy Markdown
Collaborator

Summary

  • release.yml: Skip gh release create if the release already exists (prevents HTTP 422 when release is created manually before CI runs)
  • changelog.yml: Use peter-evans/create-pull-request instead of git-auto-commit-action to work with protected branches that require PRs

Context

Both failures happened during the v3.1.0 and 2.3.6 releases:

  1. Release workflow failed because the GitHub release was already created manually
  2. Changelog workflow failed on 2.x because the branch is protected and rejects direct pushes

- release.yml: skip release creation if it already exists
- changelog.yml: use create-pull-request instead of direct push
Copilot AI review requested due to automatic review settings March 17, 2026 19:18
Copy link
Copy Markdown

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

Updates the release automation workflows to be resilient to two real-world CI failure modes: pre-existing GitHub releases (created manually before CI runs) and protected branches that reject direct pushes.

Changes:

  • Add a pre-check to skip gh release create when a release for the tag already exists.
  • Replace direct-commit changelog updates with a PR-based flow via peter-evans/create-pull-request.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/release.yml Checks for an existing release by tag and conditionally skips release creation to avoid HTTP 422.
.github/workflows/changelog.yml Creates a PR for CHANGELOG updates (instead of pushing directly) and adds required PR write permissions.

@ManukMinasyan ManukMinasyan merged commit 4566ce8 into 3.x Mar 17, 2026
6 checks passed
@ManukMinasyan ManukMinasyan deleted the fix/ci-release-changelog-3x branch March 18, 2026 09:45
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.

2 participants