Skip to content

ci(release): exit changeset pre mode before snapshot prerelease#3665

Merged
ericallam merged 1 commit into
mainfrom
fix/release-prerelease-exit-pre-mode
May 19, 2026
Merged

ci(release): exit changeset pre mode before snapshot prerelease#3665
ericallam merged 1 commit into
mainfrom
fix/release-prerelease-exit-pre-mode

Conversation

@ericallam
Copy link
Copy Markdown
Member

Summary

The prerelease (snapshot) path of the release workflow fails immediately whenever main carries an active .changeset/pre.json (i.e. during an in-progress RC cycle, like the current v4 RC):

🦋 error Snapshot release is not allowed in pre mode
🦋 To resolve this exit the pre mode by running `changeset pre exit`

This blocks chat-prerelease snapshots from main even though the snapshots are unrelated to the RC cycle.

Adds a conditional changeset pre exit step right before Snapshot version in the prerelease job. The job runs on a checkout with persist-credentials: false, so the pre.json deletion stays on the runner's working tree — main's persisted pre-mode state is untouched, and v4 RC publishes keep working normally.

Test plan

  • Re-run the 🦋 Changesets Release workflow with type=prerelease, ref=main, prerelease_tag=chat-prerelease and confirm it gets past the snapshot step and publishes.
  • Confirm .changeset/pre.json on main is unchanged after the run.

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.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 47f5b600-00a4-496e-a5c9-e4c0fdd3ad81

📥 Commits

Reviewing files that changed from the base of the PR and between 2f261e5 and a779da4.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
📜 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)
  • GitHub Check: Zizmor
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/release.yml (1)

305-310: LGTM!


Walkthrough

This PR adds a new workflow step to the prerelease job in .github/workflows/release.yml. The step conditionally exits Changesets pre mode by checking for the .changeset/pre.json file and executing pnpm exec changeset pre exit when present. This step runs before snapshot versioning to ensure pre mode does not interfere with subsequent release operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description addresses the issue clearly and includes a test plan, but does not follow the required template structure with all specified sections. Reorganize the description to match the template structure: add 'Closes #', include the checklist, and clearly separate Testing, Changelog, and Screenshots sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding a step to exit changeset pre mode before snapshot prerelease in the CI workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-prerelease-exit-pre-mode

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericallam ericallam marked this pull request as ready for review May 19, 2026 09:10
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@ericallam ericallam merged commit e825409 into main May 19, 2026
26 checks passed
@ericallam ericallam deleted the fix/release-prerelease-exit-pre-mode branch May 19, 2026 09:11
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