Use a PR-based release flow (proper fix)
Updaterelease.yml so the version bump goes through a PR instead of pushing directly. Replace the "Commit version bump" step with:
- name: Create release PR
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "release: bump version to ${{ env.VERSION }}"
branch: "release/${{ env.VERSION }}"
title: "release: v${{ env.VERSION }}"
body: "Automated version bump to ${{ env.VERSION }}"
sign-commits: true
Then merge the PR manually (or auto-merge), and create the tag/release after merge. This is more work upfront but plays nicely with branch protection rules long-term.
Use a PR-based release flow (proper fix)
Update
release.ymlso the version bump goes through a PR instead of pushing directly. Replace the "Commit version bump" step with:Then merge the PR manually (or auto-merge), and create the tag/release after merge. This is more work upfront but plays nicely with branch protection rules long-term.