ci(release): exit changeset pre mode before snapshot prerelease#3665
Conversation
The prerelease snapshot path fails with 'Snapshot release is not allowed in pre mode' whenever main carries an active .changeset/pre.json (e.g. during an in-progress RC cycle). Conditionally run 'changeset pre exit' before the snapshot step so the prerelease job can produce snapshot versions without affecting the persisted pre-mode state on main.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (1)
WalkthroughThis PR adds a new workflow step to the Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
The prerelease (snapshot) path of the release workflow fails immediately whenever
maincarries an active.changeset/pre.json(i.e. during an in-progress RC cycle, like the current v4 RC):This blocks
chat-prereleasesnapshots from main even though the snapshots are unrelated to the RC cycle.Adds a conditional
changeset pre exitstep right beforeSnapshot versionin the prerelease job. The job runs on a checkout withpersist-credentials: false, so thepre.jsondeletion stays on the runner's working tree — main's persisted pre-mode state is untouched, and v4 RC publishes keep working normally.Test plan
🦋 Changesets Releaseworkflow withtype=prerelease,ref=main,prerelease_tag=chat-prereleaseand confirm it gets past the snapshot step and publishes..changeset/pre.jsononmainis unchanged after the run.