Skip to content

fix: update release workflow to respect branch protection#1218

Merged
markussiebert merged 5 commits intomainfrom
fix/update-release-workflows
Jan 12, 2026
Merged

fix: update release workflow to respect branch protection#1218
markussiebert merged 5 commits intomainfrom
fix/update-release-workflows

Conversation

@markussiebert
Copy link
Copy Markdown
Contributor

Updates the release workflow to work with branch protection rules:

  • Modify create-release workflow to create PR instead of direct push to main
  • Add tag-on-merge workflow to create tags when release PRs are merged
  • Ensures release process works with branch protection rules

This fixes the issue where the create-release workflow was failing due to protected branch restrictions.

- modify create-release workflow to create PR instead of direct push
- add tag-on-merge workflow to create tags when release PRs are merged
- ensures release process works with branch protection rules
Copy link
Copy Markdown
Contributor

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

This PR updates the release workflow to work with branch protection rules by moving from a direct push model to a pull request model. Instead of pushing directly to main, the create-release workflow now creates a release branch and PR, and a new tag-on-merge workflow handles tag creation and release publishing when the PR is merged.

Changes:

  • Modified create-release workflow to create a PR instead of direct push to main
  • Added new tag-on-merge workflow to create tags and trigger releases when release PRs merge
  • Added pull-requests: write permission to create-release workflow

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
.github/workflows/create-release.yml Modified to create release branch and PR instead of direct push; added PR creation logic
.github/workflows/tag-on-merge.yml New workflow that triggers on PR merge to create tags, releases, and trigger release workflow
Comments suppressed due to low confidence (1)

.github/workflows/create-release.yml:96

  • These steps (Create GitHub Release and Trigger release workflow) should be removed from this workflow. They are attempting to create a release and trigger the release workflow before the PR is merged, but the tag doesn't exist yet at this point. The tag will only be created when the PR is merged by the tag-on-merge workflow. This logic belongs in the tag-on-merge.yml workflow, where it's already implemented (lines 45-57 of that file). Creating the release here will result in duplicate releases being created.
      - name: Create GitHub Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          # Create GitHub release using the changelog content
          gh release create ${{ steps.version.outputs.new_tag }} \
            --title "${{ steps.version.outputs.new_tag }}" \
            --notes-file /tmp/release_notes.md

      - name: Trigger release workflow on tag
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          # Manually trigger the 'release' workflow on the new tag ref
          # Using workflow_dispatch with ref to run on the tag
          gh workflow run release.yml --ref ${{ steps.version.outputs.new_tag }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/tag-on-merge.yml
Comment thread .github/workflows/create-release.yml Outdated
Comment thread .github/workflows/tag-on-merge.yml
Comment thread .github/workflows/tag-on-merge.yml
Comment thread .github/workflows/tag-on-merge.yml
Comment thread .github/workflows/tag-on-merge.yml Outdated
markussiebert and others added 4 commits January 12, 2026 07:44
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@markussiebert markussiebert enabled auto-merge (squash) January 12, 2026 06:46
@markussiebert markussiebert merged commit 1b956ad into main Jan 12, 2026
2 checks passed
This was referenced Jan 12, 2026
@github-actions github-actions Bot mentioned this pull request Jan 19, 2026
@github-actions github-actions Bot mentioned this pull request Feb 7, 2026
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