Commit Graph

1 Commits

Author SHA1 Message Date
Phantom
336176be08 feat: introduce changeset for monorepo version management (#12783)
## Summary

This PR introduces
[changesets](https://github.com/changesets/changesets) to automate
version management and publishing for the Cherry Studio monorepo.

## Changes

### Changeset Setup
- `.changeset/config.json` - Changeset configuration with GitHub
changelog integration
- `.changeset/README.md` - Documentation for using changesets and CI/CD
release flow
- `.changeset/initial-setup.md` - Initial changeset marking the setup

### CI/CD Workflows
- `.github/workflows/release-packages.yml` - Automated release workflow
(creates Version Packages PR, publishes on merge)
- `.github/workflows/snapshot.yml` - Manual snapshot release workflow
- `.github/workflows/ci.yml` - Added `changeset-check` job to verify PRs
include changesets when packages are modified

### Package Updates
- `package.json` - Added changeset scripts (`changeset`,
`changeset:status`, `changeset:version`, `changeset:publish`,
`packages:build`, `packages:release`)
- `packages/aiCore/package.json` - Added `prepublishOnly` script
- `packages/ai-sdk-provider/package.json` - Added `prepublishOnly`
script
- `packages/extension-table-plus/package.json` - Added `prepublishOnly`
script
- `packages/extension-table-plus/CHANGELOG-OLD.md` - Backup of
historical changelog

## How It Works

1. **Developers**: Run `pnpm changeset add` in PRs that modify packages
2. **CI**: `changeset-check` job validates PRs include changesets when
needed
3. **Accumulate**: Merging PRs with changesets auto-creates/updates a
"Version Packages" PR
4. **Release**: Maintainers merge the Version Packages PR when ready →
packages are published to npm

## Requirements

- [ ] `NPM_TOKEN` secret must be configured in GitHub repository
settings

## Test Plan

- [x] `pnpm changeset:status` runs successfully
- [x] `GITHUB_TOKEN=$(gh auth token) pnpm changeset:version` bumps
versions and generates changelogs correctly
- [x] `pnpm packages:build` builds all packages in correct order
- [x] `pnpm format` passes

## Release Note

```release-note
NONE (internal tooling change)
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: icarus <eurfelux@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:00:45 +08:00