-
Notifications
You must be signed in to change notification settings - Fork 170
ci: move to changesets for releases #4003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Saadnajmi
merged 27 commits into
microsoft:main
from
Saadnajmi:changesets-hybrid-mirrornx-kit
Feb 13, 2026
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
5d938e9
feat: implement hybrid changesets workflow (mirror rnx-kit)
Saadnajmi fda6d2b
lock
Saadnajmi f2e5d87
feat: add PR validation for changesets
Saadnajmi acddb3b
Apply suggestion from @tido64
Saadnajmi a373b59
fix config
Saadnajmi 496f6ab
docs(changeset): Switch to changesets
Saadnajmi b258a5e
Dont use github app yet, more updates
github-actions[bot] ca20bde
Add a bunch of validation
github-actions[bot] d444021
don't export token
github-actions[bot] 47d4ce0
Remove beachball references
github-actions[bot] 46ad0eb
Remove AI generated markdown, rename yaml
github-actions[bot] 0839381
remove check-changes
github-actions[bot] 6d00718
use zx
github-actions[bot] c43952b
Update pr.yml
Saadnajmi 034b203
remove check-changes, use yarn scripts
github-actions[bot] 0b2c320
Merge branch 'changesets-hybrid-mirrornx-kit' of github.com:Saadnajmi…
github-actions[bot] 381cb97
Update changesets-version.yml
Saadnajmi 369db4b
Update .github/workflows/pr.yml
Saadnajmi c124629
Apply suggestions from code review
Saadnajmi 918fdcf
update validate to use changeset:status
github-actions[bot] ef50eec
print changeset stdout
github-actions[bot] 5b9c89c
typo
github-actions[bot] 8a03d23
one version command
github-actions[bot] 6ac3c07
Merge branch 'changesets-hybrid-mirrornx-kit' of github.com:Saadnajmi…
github-actions[bot] 5a5aabd
use default title and commit
github-actions[bot] c23ad55
Rename 'changeset' script to 'change'
Saadnajmi 34ffd6a
yarn workspaces foreach to publish
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| --- | ||
| "@fluentui-react-native/adapters": patch | ||
| "@fluentui-react-native/android-theme": patch | ||
| "@fluentui-react-native/apple-theme": patch | ||
| "@fluentui-react-native/avatar": patch | ||
| "@fluentui-react-native/badge": patch | ||
| "@fluentui-react-native/button": patch | ||
| "@fluentui-react-native/callout": patch | ||
| "@fluentui-react-native/checkbox": patch | ||
| "@fluentui-react-native/chip": patch | ||
| "@fluentui-react-native/codemods": patch | ||
| "@fluentui-react-native/composition": patch | ||
| "@fluentui-react-native/contextual-menu": patch | ||
| "@fluentui-react-native/default-theme": patch | ||
| "@fluentui-react-native/divider": patch | ||
| "@fluentui-react-native/drawer": patch | ||
| "@fluentui-react-native/dropdown": patch | ||
| "@fluentui-react-native/experimental-activity-indicator": patch | ||
| "@fluentui-react-native/experimental-appearance-additions": patch | ||
| "@fluentui-react-native/experimental-avatar": patch | ||
| "@fluentui-react-native/experimental-checkbox": patch | ||
| "@fluentui-react-native/experimental-expander": patch | ||
| "@fluentui-react-native/experimental-menu-button": patch | ||
| "@fluentui-react-native/experimental-native-date-picker": patch | ||
| "@fluentui-react-native/experimental-native-font-metrics": patch | ||
| "@fluentui-react-native/experimental-shadow": patch | ||
| "@fluentui-react-native/experimental-shimmer": patch | ||
| "@fluentui-react-native/focus-trap-zone": patch | ||
| "@fluentui-react-native/focus-zone": patch | ||
| "@fluentui-react-native/framework": patch | ||
| "@fluentui-react-native/framework-base": patch | ||
| "@fluentui-react-native/icon": patch | ||
| "@fluentui-react-native/immutable-merge": patch | ||
| "@fluentui-react-native/input": patch | ||
| "@fluentui-react-native/interactive-hooks": patch | ||
| "@fluentui-react-native/link": patch | ||
| "@fluentui-react-native/memo-cache": patch | ||
| "@fluentui-react-native/menu": patch | ||
| "@fluentui-react-native/menu-button": patch | ||
| "@fluentui-react-native/merge-props": patch | ||
| "@fluentui-react-native/notification": patch | ||
| "@fluentui-react-native/overflow": patch | ||
| "@fluentui-react-native/persona": patch | ||
| "@fluentui-react-native/persona-coin": patch | ||
| "@fluentui-react-native/popover": patch | ||
| "@fluentui-react-native/pressable": patch | ||
| "@fluentui-react-native/radio-group": patch | ||
| "@fluentui-react-native/separator": patch | ||
| "@fluentui-react-native/spinner": patch | ||
| "@fluentui-react-native/stack": patch | ||
| "@fluentui-react-native/styling-utils": patch | ||
| "@fluentui-react-native/switch": patch | ||
| "@fluentui-react-native/tablist": patch | ||
| "@fluentui-react-native/text": patch | ||
| "@fluentui-react-native/theme": patch | ||
| "@fluentui-react-native/theme-tokens": patch | ||
| "@fluentui-react-native/theme-types": patch | ||
| "@fluentui-react-native/themed-stylesheet": patch | ||
| "@fluentui-react-native/theming-utils": patch | ||
| "@fluentui-react-native/tokens": patch | ||
| "@fluentui-react-native/tooltip": patch | ||
| "@fluentui-react-native/use-slot": patch | ||
| "@fluentui-react-native/use-slots": patch | ||
| "@fluentui-react-native/use-styling": patch | ||
| "@fluentui-react-native/use-tokens": patch | ||
| "@fluentui-react-native/vibrancy-view": patch | ||
| "@fluentui-react-native/win32-theme": patch | ||
| "@fluentui/react-native": patch | ||
| "@uifabricshared/foundation-composable": patch | ||
| "@uifabricshared/foundation-compose": patch | ||
| "@uifabricshared/foundation-settings": patch | ||
| "@uifabricshared/foundation-tokens": patch | ||
| "@uifabricshared/theme-registry": patch | ||
| "@uifabricshared/themed-settings": patch | ||
| "@uifabricshared/theming-ramp": patch | ||
| "@uifabricshared/theming-react-native": patch | ||
| --- | ||
|
|
||
| # Migration from Beachball to Changesets | ||
|
|
||
| This changeset represents the migration from Beachball to Changesets for version management and consolidates all changes from 440+ beachball change files that were in the `change/` directory. | ||
|
|
||
| All 75 affected packages receive a patch version bump to acknowledge the accumulated changes from the beachball era. | ||
|
|
||
| ## What Changed | ||
|
|
||
| Going forward, all version management uses Changesets via `yarn changeset`. The following beachball infrastructure has been removed: | ||
|
|
||
| - ❌ 440+ beachball change files from `change/` directory | ||
| - ❌ `beachball` package dependency | ||
| - ❌ Beachball scripts from `package.json` | ||
| - ❌ `beachball.config.js` configuration file | ||
| - ❌ Beachball publish steps from Azure Pipelines | ||
|
|
||
| ## New Workflow | ||
|
|
||
| ✅ **Create changes**: Run `yarn changeset` to document changes | ||
| ✅ **Version bump PRs**: Automatically created by GitHub Actions | ||
| ✅ **Publishing**: Handled by Azure Pipelines using `changeset publish` | ||
| ✅ **Validation**: CI validates changesets and blocks major version bumps | ||
|
|
||
| For details, see `CHANGESETS_SETUP.md` and `CONTRIBUTING.md`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", | ||
| "changelog": "@changesets/cli/changelog", | ||
| "commit": ["@changesets/cli/commit", { "skipCI": false }], | ||
| "linked": [], | ||
| "access": "public", | ||
| "baseBranch": "origin/main", | ||
| "ignore": [ | ||
| "@fluentui-react-native/dependency-profiles", | ||
| "@fluentui-react-native/e2e-testing", | ||
| "@fluentui-react-native/tester", | ||
| "@fluentui-react-native/tester-core", | ||
| "@fluentui-react-native/tester-win32", | ||
| "@fluentui-react-native/tester-win32-81", | ||
| "@fluentui-react-native/test-*" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/usr/bin/env zx | ||
| import 'zx/globals'; | ||
|
|
||
| /** | ||
| * Changeset version bump with post-bump hook | ||
| * | ||
| * This script orchestrates the version bump process: | ||
| * 1. Runs changeset version to bump package versions | ||
| * 2. Updates dependency-profiles with new versions | ||
| * 3. Updates yarn.lock to reflect all changes | ||
| * | ||
| * The changesets action will automatically commit these changes. | ||
| */ | ||
|
|
||
| const DEPENDENCY_PROFILES_DIR = 'packages/dependency-profiles'; | ||
|
|
||
| echo('📦 Running changeset version...'); | ||
| await $`yarn changeset version`; | ||
|
|
||
| // Undo the commit that changeset version made, but keep the changes | ||
| // This allows the changesets action to create a single commit with all changes | ||
| echo('🔙 Undoing changeset commit (keeping changes)...'); | ||
| await $`git reset --soft HEAD~1`; | ||
|
|
||
| echo('\n🔄 Updating dependency-profiles...'); | ||
| if (fs.existsSync(DEPENDENCY_PROFILES_DIR)) { | ||
| cd(DEPENDENCY_PROFILES_DIR); | ||
| await $`yarn update-profile`; | ||
| cd('../..'); | ||
| echo('✅ dependency-profiles updated'); | ||
| } else { | ||
| echo('⚠️ dependency-profiles not found, skipping'); | ||
| } | ||
|
|
||
| echo('\n🔒 Updating yarn.lock...'); | ||
| await $`yarn install --mode update-lockfile`; | ||
|
|
||
| echo('\n✅ Version bump complete!'); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| #!/usr/bin/env zx | ||
| import 'zx/globals'; | ||
|
|
||
| // Type declaration for process (zx doesn't include Node.js types) | ||
| declare const process: { | ||
| env: Record<string, string | undefined>; | ||
| cwd: () => string; | ||
| argv: string[]; | ||
| exit: (code: number) => never; | ||
| }; | ||
|
|
||
| /** | ||
| * Publish a single package to npm if needed | ||
| * | ||
| * This script: | ||
| * - Operates on the current workspace directory | ||
| * - Checks npm registry before publishing | ||
| * - Skips private packages automatically | ||
| * | ||
| * Usage: | ||
| * # In a workspace directory: | ||
| * npx zx publish-package-if-needed.mts # Publish for real | ||
| * npx zx publish-package-if-needed.mts --dry-run # Simulate publishing | ||
| * | ||
| * # For all workspaces in topological order: | ||
| * yarn workspaces foreach --all --topological --no-private \ | ||
| * exec npx zx .github/scripts/publish-package-if-needed.mts | ||
| */ | ||
|
|
||
| // Parse command line arguments | ||
| const isDryRun = process.argv.includes('--dry-run'); | ||
|
|
||
| // Read package.json from current directory | ||
| const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8')); | ||
| const { name, version, private: isPrivate } = packageJson; | ||
|
|
||
| // Skip private packages | ||
| if (isPrivate) { | ||
| echo(`⊘ Skipping private package: ${name}`); | ||
| process.exit(0); | ||
| } | ||
|
|
||
| // Check if package@version already exists on npm | ||
| const result = await $`npm view ${name}@${version} version 2>&1`.nothrow().quiet(); | ||
| const shouldPublish = result.exitCode !== 0 || result.stdout.trim() !== version; | ||
|
|
||
| if (!shouldPublish) { | ||
| echo(`✓ Already published: ${name}@${version}`); | ||
| process.exit(0); | ||
| } | ||
|
|
||
| // Publish the package | ||
| const startMsg = isDryRun ? 'Simulating publish' : 'Publishing'; | ||
| const endMsg = isDryRun ? 'Dry-run successful for' : 'Successfully published'; | ||
|
|
||
| echo(`→ ${startMsg}: ${name}@${version}`); | ||
|
|
||
| const publishCmd = isDryRun | ||
| ? $`yarn npm publish --access public --dry-run` | ||
| : $`yarn npm publish --access public`; | ||
|
|
||
| await publishCmd; | ||
| echo(`✓ ${endMsg}: ${name}@${version}`); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.