Skip to content

fix(ci): switch release workflow to PR-based merge#404

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/release-workflow-pr-based
Feb 18, 2026
Merged

fix(ci): switch release workflow to PR-based merge#404
zbigniewsobiecki merged 1 commit intodevfrom
fix/release-workflow-pr-based

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • The release workflow (release.yml) was failing with GH013: Repository rule violations because the "Protect main" ruleset requires all changes to go through a PR
  • GitHub Actions cannot be added as a bypass actor on personal (non-org) repositories
  • Switch the workflow from direct git push origin main to creating a PR with auto-merge enabled

Changes

  • Add pull-requests: write permission to the workflow job
  • Replace the direct merge+push step with three new steps:
    1. Check for existing release PR — fail-fast guard against duplicates
    2. Create release PRgh pr create from devmain with commit summary
    3. Enable auto-mergegh pr merge --auto --merge so it merges once checks pass
  • Remove the Configure git step (no longer needed without direct push)
  • Update step summary to reflect the new PR-based flow
  • Enable repo-level auto-merge setting (required for --auto flag)

Test plan

  • Workflow YAML is valid (linted by lefthook pre-commit)
  • CI passes on this PR
  • Trigger the release workflow after merging to verify end-to-end

🤖 Generated with Claude Code

The "Protect main" ruleset requires all changes to go through a pull
request, which caused the release workflow to fail with GH013 when
pushing directly. GitHub Actions cannot be added as a bypass actor on
personal repositories.

Switch to creating a PR from dev→main with auto-merge enabled. The PR
goes through the normal required checks (lint-and-test, enforce-dev-to-main)
and merges automatically once they pass.

Changes:
- Add pull-requests: write permission
- Replace direct git push with gh pr create + gh pr merge --auto
- Add guard against duplicate open release PRs
- Remove git config step (no longer pushing directly)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 1d682f8 into dev Feb 18, 2026
4 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/release-workflow-pr-based branch February 18, 2026 16:38
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