Skip to content

refactor(ci): simplify release workflow to dispatch-only#66

Merged
kolkov merged 1 commit into
mainfrom
refactor/release-workflow-dispatch-only
Jan 20, 2026
Merged

refactor(ci): simplify release workflow to dispatch-only#66
kolkov merged 1 commit into
mainfrom
refactor/release-workflow-dispatch-only

Conversation

@kolkov
Copy link
Copy Markdown
Contributor

@kolkov kolkov commented Jan 19, 2026

Summary

Simplifies the release workflow by removing release branch support and keeping only workflow_dispatch trigger.

Problem

The previous workflow supported two release methods:

  1. workflow_dispatch - manual trigger with version input
  2. push to release/* branch - auto-trigger

The release branch approach had a critical flaw: after creating the release, the workflow tried to merge the release branch back to main, which failed due to branch protection rules. GitHub Actions with GITHUB_TOKEN cannot bypass protected branch rules.

Solution

Remove the release branch trigger entirely. Use only workflow_dispatch:

# New release process:
gh workflow run release.yml -f version=0.9.4

Changes

  • Remove push trigger on release/* branches
  • Remove "Merge release branch to main" step (doesn't work with protected branches)
  • Simplify version determination logic (no branch name parsing)
  • Update documentation comments

Benefits

  • Simpler workflow (one trigger instead of two)
  • No merge-back issues with protected branches
  • Tag created only after tests pass
  • Standard approach used by GoReleaser and other Go projects

References

- Remove release/* branch trigger (was causing merge-back issues)
- Remove auto-merge step (doesn't work with protected branches)
- Keep only workflow_dispatch trigger
- Update documentation comments

Release process now:
1. Merge all changes to main via PR
2. Run: gh workflow run release.yml -f version=X.Y.Z
3. Workflow runs tests, creates tag, publishes release

References:
- https://carlosbecker.com/posts/goreleaser-create-tag-action/
- https://github.com/orgs/community/discussions/25305
@kolkov kolkov merged commit 6143bf4 into main Jan 20, 2026
3 checks passed
@kolkov kolkov deleted the refactor/release-workflow-dispatch-only branch January 20, 2026 09:36
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