Skip to content

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

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

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

Conversation

@ManukMinasyan
Copy link
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 2.3.6 release:

  1. Release workflow failed because the GitHub release was already created manually
  2. Changelog workflow failed because 2.x is a protected branch that 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:19
Copy link

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 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 create when 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.

@ManukMinasyan ManukMinasyan merged commit bdf91b6 into 2.x Mar 17, 2026
6 checks passed
@ManukMinasyan ManukMinasyan deleted the fix/ci-release-changelog-2x 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