Skip to content

Conversation

@Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Jan 21, 2026

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

This is the first in a series of changes to redo the publish flow for FURN.

The current release uses beachball, which requires a CI workflow (in Azure Pipelines) that on every commit to main:

  • Deletes change files and bumps versions in the repo
  • Publish to NPM
  • Push the version bump back to Github.

This workflow has two main issues:

  • Azure Pipelines requires a long lived Github token with write permission to main. This is especially bad as long lived tokens are getting phased out with no auto-rotate tool.
  • If the NPM publish succeeds but not the push back to Github (or vice versa), then the repo is left in a bad state and subsequent publishes fail

To fix this, I propose a new workflow, very similar to Changesets as used by rnx-kit, except still using beachball under the hood.

The new workflow is as follows:

  • Introduce a new Github Action that mirrors the changeset action: It creates a PR to commit the version bump to git, rather than writing to main
  • After the version bump merges, a separate Azure Pipelines workflow (for compliance) still does the NPM publish on every commit, with no changes to the repo.

Developers in FURN still use the familiar change files, but now:

  • We no longer need a Github Token as Github Actions can generate one that lives only as long as the workflow run
  • NPM publish (the hard, irreversible thing) runs after the git bump (the easy to revert thing). Therefore, if we end up in a bad state, it's much easier to revert a commit and recover. Consequently, NPM will just mirror whatever state the Github repo is in.

Verification

After this merges, I'd expect a PR to be generated.

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

@Saadnajmi Saadnajmi changed the title ci: introduce beachball-release action ci(release): introduce beachball-release action (1/2) Jan 21, 2026
@Saadnajmi Saadnajmi changed the title ci(release): introduce beachball-release action (1/2) ci(release): introduce new release workflow Jan 22, 2026
@Saadnajmi Saadnajmi marked this pull request as draft January 22, 2026 23:16
@JasonVMo
Copy link
Contributor

This is exciting. One things I'd like to see, though I haven't looked deeply enough to see if this accomplishes it, is for the PR to be regenerated if more changes come in. That way we don't get one version bump per change but rather one per publish.

@Saadnajmi
Copy link
Collaborator Author

is for the PR to be regenerated if more changes come in.

There's a check to update the existing PR rather than make a new one. Would love to just use the changesets action because I'm sure I'm just reinventing the wheel in all the ways they already have.

Implements 3-tier progressive fallback for GitHub's 65k character limit:
- Tier 1: Full changelog with all package details
- Tier 2: Package list only (no changelog content)
- Tier 3: Minimal - package count with link to commit

Prevents pipeline failures with large monorepo changelogs.

Part of Phase 1 (Critical) - beachball workflow improvements.
- Add type guards for 404, network, and rate limit errors
- Create custom NetworkError and RateLimitError classes
- Update check-packages-need-publishing to use error type guards
- Distinguish between expected 404s and actual failures
- Provide clear, actionable error messages

Part of Phase 2 (High Priority) - beachball workflow improvements.
- Auto-creates releases with changelog extraction
- Creates git tags for published packages
- Handles existing releases gracefully
- Extracts changelog sections for each version
- Provides detailed summary of successes/skips/errors

Part of Phase 3 (Medium Priority) - beachball workflow improvements.
Version Bump Stage:
- Add PR body size management with 3-tier fallback
- Add pre-fetch existing PR before push (prevents corruption)
- Add smart force-push vs fast-forward detection
- Add sequential lock to prevent concurrent runs

Publish Stage:
- Add check for packages needing publishing
- Add partial publish failure detection
- Add NPM authentication pre-check
- Add GitHub releases automation after publish
- Add detailed logging for all operations

Integrates all Phase 1, 2, and 3 improvements from changesets/action analysis.
- Add dedicated job to preview version bumps
- Show which packages would be published
- Run check-packages-need-publishing in dry-run mode
- Provides early feedback on PR changes before merge

Helps catch publishing issues early in PR review process.
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.

3 participants