Fix CD release: use new commit instead of force-push to update master#719
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #719 +/- ##
=======================================
Coverage 84.34% 84.34%
=======================================
Files 26 26
Lines 805 805
=======================================
Hits 679 679
Misses 126 126 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the CD release workflow so it can update master under stricter branch protection rules (no force-pushes), while still committing the version bump + changelog changes back to the default branch.
Changes:
- Switch version/changelog update from
git commit --amendto creating a new commit. - Update
CasperWA/push-protected@v2usage toforce: false, replacesleepwithpre_sleep, and enableunprotect_reviews. - Ignore the
.claude/directory in.gitignore.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.gitignore |
Ignores .claude/ artifacts. |
.github/workflows/cd_release.yml |
Avoids force-push by creating a new commit and pushing without force, updating push-protected inputs accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Fixes the CD - Release GitHub Actions workflow so it can update the protected master branch without force-pushing, addressing the current branch-protection rejection.
Changes:
- Replace
git commit --amendwith a new commit for version/CHANGELOG updates (fast-forward push). - Update
push-protected@v2inputs: switchsleep→pre_sleep, setforce: false, and enableunprotect_reviews. - Ignore local
.claude/directory via.gitignore.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/cd_release.yml |
Stops force-pushing by creating a new commit and uses non-force push-protected settings compatible with branch protection. |
.gitignore |
Adds .claude/ to ignored local/tooling artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Updates the CD release workflow to comply with master branch protection by avoiding force-push/amend and instead pushing a new fast-forward commit for version/CHANGELOG updates.
Changes:
- Switch version/CHANGELOG update from
git commit --amendto a new commit with[skip ci]. - Update
CasperWA/push-protected@v2inputs to usepre_sleep, disableforce, and enableunprotect_reviews. - Ignore local
.claude/directory in.gitignore.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/cd_release.yml |
Removes amend/force-push behavior; pushes a new commit to master using non-force push-protected settings. |
.gitignore |
Adds .claude/ to ignored paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a64addd to
cfd7834
Compare
cfd7834 to
f27f18e
Compare
…#719) Fix cd_release.yml: use a new commit and non-force push Branch protection on master has allow_force_pushes: false. The workflow was amending the last commit then force-pushing via push-protected, causing all CD runs to fail since ~December 2025. Fix by creating a plain new commit (fast-forward) and setting force: false in push-protected. Also update the deprecated sleep input to pre_sleep and enable unprotect_reviews: true to temporarily lift the PR-review requirement during the push. Add note to avoid cito the bot commit message so the version-bump commit does not trigger redundant workflow runs.
Summary
The
cd_release.ymlworkflow has been failing on every push tomastersince ~December 2025.Root cause: The workflow amends the last commit (version bump + CHANGELOG) and then uses
push-protectedwithforce: true. Master's branch protection now hasallow_force_pushes: false, so every force-push is rejected withGH006/GH013. Thepush-protected@v2action'sunprotect_reviewsonly removesrequired_pull_request_reviews— it does not touchallow_force_pushes.Fix: Replace
git commit --amend -C HEADwith a plaingit commit, so the local branch is simply one commit ahead oforigin/master(fast-forward). Setforce: falsein thepush-protectedstep. Also update the deprecatedsleepinput topre_sleep, enableunprotect_reviews: trueto temporarily lift the PR-review requirement during the push, and add[skip ci]to the commit message so it does not trigger redundant workflow runs.Trade-offs
[bot] Update version and CHANGELOG [skip ci]commit follows it. The[skip ci]token prevents any workflows from being triggered by that push, so there is no extra CI or CD run.Verification
Watch the next push to
master— theCD - Releaseworkflow should pass itsUpdate 'master'step and create the[bot] Update version and CHANGELOG [skip ci]commit onmaster.Click to view squash commit message