Skip to content

fix(release): remove direct-to-main push that violates branch protection#186

Merged
bestdan merged 1 commit into
mainfrom
copilot/fix-release-workflow-issues
Mar 23, 2026
Merged

fix(release): remove direct-to-main push that violates branch protection#186
bestdan merged 1 commit into
mainfrom
copilot/fix-release-workflow-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

The release.yml workflow was committing a version bump directly to main and pushing it, which is blocked by branch protection rules (PRs + status checks required). The workflow failed every run with GH013: Repository rule violations found for refs/heads/main.

Changes

  • Remove "Configure Git" and "Update version in package.json" steps — these committed package.json and pushed to main. Version bumps are already handled via auto-version-bump.yml (creates a PR post-merge) and tag-version.yml (tags after the bump PR merges). The release workflow doesn't need to duplicate this.

  • Move "Generate changelog" before "Create and push tag" — if changelog generation ran after tagging HEAD, git describe --tags --abbrev=0 would resolve to the newly-created tag, making git log v$VERSION..HEAD return nothing. Generating the changelog before tagging ensures git describe finds the previous tag.

Resulting step order

Validate version → Check tag doesn't exist → Build → Test
→ Generate changelog → Create & push tag → Create GitHub Release

@bestdan bestdan marked this pull request as ready for review March 23, 2026 15:12
@bestdan bestdan closed this Mar 23, 2026
@bestdan bestdan reopened this Mar 23, 2026
@bestdan bestdan merged commit 46eb790 into main Mar 23, 2026
11 checks passed
@bestdan bestdan deleted the copilot/fix-release-workflow-issues branch March 23, 2026 15:17
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