Originally created by: adityaharishch
Merging [#508] to pre-main cut an unintended staging release (v1.72.0-staging.6 — a draft prerelease, now deleted).
release-prepare.yml triggered on every push to pre-main and gated on:
contains(github.event.head_commit.message, '[staging-release]')
A squash merge folds every PR commit's body into the merge commit message, and this repo's own workflow comments quote the literal marker [staging-release]. So merging a PR that merely touched these files matched the gate → semantic-release ran → a release was cut. A substring match on a commit message you don't control is not a safe trigger.
Remove the push trigger entirely. Staging releases now cut only via manual workflow_dispatch (Actions → Release (prepare) → Run workflow). A release can no longer happen as a side effect of a merge. The job's if: guard is removed too — reaching the job now means a human clicked the button.
release-build never fired), no DMG published.pre-main.releases/latest).Actions → Release (prepare) → Run workflow (branch: pre-main). Optionally tick dry_run first to preview the version. It tags v*-staging.N, which triggers release-build.yml.
Originally posted by: coderabbitai[bot]
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `fix/staging-release-manual-trigger`Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)Comment
@coderabbitai helpto get the list of available commands.Ticket changed by: adityaharishch
Originally posted by: adityaharishch
Updated per requirement: staging should auto-release on every pre-main merge (no button)
Reworked this PR. It no longer makes releases manual — instead it does what you want (auto-release on merge) safely:
pushtopre-main(+workflow_dispatchkept for on-demand /dry_runpreviews).v*-staging.Nprerelease when there are releasable commits (feat/fix/perf…) since the last staging tag, and no-ops on chore/docs/ci-only merges. That tag then triggersrelease-build.yml→ per-arch DMG → staging channel.The original bug was never "auto-release" — it was matching a
[staging-release]substring in a commit message you don't fully control (a squash body quoting the marker fired it). Removing the string match entirely and letting semantic-release judge the commits is the canonical pattern and can't misfire.Net behaviour after this merges
pre-main→ staging build is cut and published automatically → install/dogfood it on the staging channel → promotepre-main → mainwhen happy.Originally posted by: adityaharishch
Clarification: this PR merged as manual-only (
workflow_dispatch), which is what's onpre-mainnow. The later intent — auto-release on every pre-main merge — is in #512 (supersedes this). Ignore my edited title/comment above; the auto-on-push change lives in [#512].Related
Tickets:
#512