Skip to content

internal(fix): Gate GitHub releases on hasChangesets instead of published#3816

Merged
ntucker merged 1 commit intomasterfrom
fix-github-releases-gating
Mar 25, 2026
Merged

internal(fix): Gate GitHub releases on hasChangesets instead of published#3816
ntucker merged 1 commit intomasterfrom
fix-github-releases-gating

Conversation

@ntucker
Copy link
Collaborator

@ntucker ntucker commented Mar 25, 2026

Motivation

GitHub releases were being created on every push to master, even when only adding a changeset (before the Version Packages PR is merged and npm publish runs). This happened because the create-github-releases.mjs script ran unconditionally.

The previous fix (published == 'true') was tried three times (d3c2a0b, f526931, 21834d2) and reverted each time because changesets/action cannot detect publications from the custom yarn workspaces foreach ... npm publish command — published is never 'true'.

Solution

Gate the "Create GitHub Releases" step on hasChangesets == 'false' instead. This output is reliable because it simply checks whether .changeset/*.md files exist, independent of the publish command:

  • Changeset pushedhasChangesets = 'true' → skip releases
  • Version Packages PR mergedhasChangesets = 'false' → publish runs, then create releases
  • Other pushhasChangesets = 'false' → script runs but is idempotent (all releases already exist)

Open questions

N/A

Made with Cursor


Note

Low Risk
Low risk workflow-only change that just conditions when scripts/create-github-releases.mjs runs; main risk is skipping release creation if hasChangesets output behavior changes.

Overview
Updates the release GitHub Action to only run the “Create GitHub Releases” step when steps.changesets.outputs.hasChangesets == 'false', preventing release creation on pushes that merely add changesets.

Adds matching inline documentation in scripts/create-github-releases.mjs to clarify that release creation is CI-gated by hasChangesets rather than published.

Written by Cursor Bugbot for commit e078faa. This will update automatically on new commits. Configure here.

…shed

`published == 'true'` is never satisfied because changesets/action
cannot detect publications from the custom `yarn workspaces foreach`
publish command. Use `hasChangesets == 'false'` which reliably indicates
the Version Packages PR was merged and publish executed.

Made-with: Cursor
@changeset-bot
Copy link

changeset-bot bot commented Mar 25, 2026

⚠️ No Changeset found

Latest commit: e078faa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs-site Ignored Ignored Mar 25, 2026 1:06pm

@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.06%. Comparing base (85c9ce3) to head (e078faa).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3816   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         151      151           
  Lines        2843     2843           
  Branches      556      556           
=======================================
  Hits         2788     2788           
  Misses         11       11           
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ntucker ntucker merged commit 339a447 into master Mar 25, 2026
22 checks passed
@ntucker ntucker deleted the fix-github-releases-gating branch March 25, 2026 13:09
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.

1 participant