fix: handle pre-existing releases and protected branch pushes in CI [2.x]#112
Merged
ManukMinasyan merged 1 commit into2.xfrom Mar 17, 2026
Merged
fix: handle pre-existing releases and protected branch pushes in CI [2.x]#112ManukMinasyan merged 1 commit into2.xfrom
ManukMinasyan merged 1 commit into2.xfrom
Conversation
- release.yml: skip release creation if it already exists - changelog.yml: use create-pull-request instead of direct push
There was a problem hiding this comment.
Pull request overview
Updates the repository’s GitHub Actions release automation to be resilient to two failure modes observed during the 2.3.6 release: pre-created GitHub Releases and protected maintenance branches that reject direct pushes.
Changes:
- Add a pre-check in the release workflow to skip
gh release createwhen the release already exists. - Update the changelog workflow to open a PR (instead of pushing a commit directly) so it works with protected branches requiring PR-based changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
Adds an existence check via gh release view and conditionally creates the release to avoid HTTP 422 on duplicates. |
.github/workflows/changelog.yml |
Switches to peter-evans/create-pull-request and adds pull-requests: write permission to support protected branches. |
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
gh release createif the release already exists (prevents HTTP 422 when release is created manually before CI runs)peter-evans/create-pull-requestinstead ofgit-auto-commit-actionto work with protected branches that require PRsContext
Both failures happened during the 2.3.6 release: