ci: automate versioning and releases with changesets#60
ci: automate versioning and releases with changesets#60WilliamBergamin wants to merge 7 commits into
Conversation
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
| changeset: ## Create a changeset describing a user-facing change (for the next release) | ||
| npx --yes @changesets/cli add | ||
|
|
There was a problem hiding this comment.
Should we just document this? 🤔
There was a problem hiding this comment.
🔭 thought: Recent commits for contributors guide and this "help" command seem solid to me!
$ make help
changeset Create a changeset describing a user-facing change (for the next release)
zimeg
left a comment
There was a problem hiding this comment.
@WilliamBergamin Amazing changes to see! 🚀 ✨
I'm leaving a few comments and thoughts but might call out locking dependencies as part of this project? I understand it adds more node to a python project but the added confidence in releases is what motivates me.
Please feel free to merge whenever though! All changes are great! I was quibbling in review 👻
| [gh-cli]: https://cli.github.com | ||
| [conv-commits]: https://www.conventionalcommits.org | ||
| [semver]: https://semver.org | ||
| [changesets]: https://github.com/changesets/changesets |
There was a problem hiding this comment.
| [changesets]: https://github.com/changesets/changesets |
🪓 quibble(non-blocking): Is this link inlined instead?
|
|
||
| 1. **Run the tests locally**: Before merging the release PR please run all the tests especially the eval ones. If they no longer pass we may need fix it before releasing the changes. | ||
|
|
||
| 2. **Check GitHub**: Please check if issues or pull requests are still open either decide to postpone the release or save those changes for a future update. |
There was a problem hiding this comment.
🔮 question: Are milestones something we want to introduce here, either now or later?
|
|
||
| 3. **Review the release PR**: Verify that the version bump matches expectations, `CHANGELOG` entries are clear, and CI checks pass. | ||
|
|
||
| 4. **Merge and approve**: Merge the release PR. It may take up to 24 hours before you see you release in [plugins/slack](https://claude.com/plugins/slack). |
There was a problem hiding this comment.
| 4. **Merge and approve**: Merge the release PR. It may take up to 24 hours before you see you release in [plugins/slack](https://claude.com/plugins/slack). | |
| 4. **Merge and approve**: Merge the release PR. It may take up to 24 hours before you see you release in the [Claude Plugins](https://claude.com/plugins/slack) directory. |
🦠 suggestion: This wording might be odd but I based it from the backing project.
Claude Code Plugins Directory
| Add the channel-digest command | ||
| ``` | ||
|
|
||
| The frontmatter key is always `"slack"`, the value is the [semver](https://semver.org/) bump level. The body becomes the changelog entry, so write it for a reader of the release notes. |
There was a problem hiding this comment.
| The frontmatter key is always `"slack"`, the value is the [semver](https://semver.org/) bump level. The body becomes the changelog entry, so write it for a reader of the release notes. | |
| The frontmatter key is always `"slack"`, the value is the [semver](https://semver.org/) bump level - `patch`, `minor`, or `major`. The body becomes the changelog entry, so write it for a reader of the release notes. |
📚 suggestion(non-blocking): For quick reads wanting example these versions might be nice?
| steps: | ||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
| with: | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
| fetch-depth: 0 | |
| fetch-depth: 0 | |
| persist-credentials: false |
🔏 suggestion: To avoid oddities with actions later-
| changeset: ## Create a changeset describing a user-facing change (for the next release) | ||
| npx --yes @changesets/cli add | ||
|
|
There was a problem hiding this comment.
🔭 thought: Recent commits for contributors guide and this "help" command seem solid to me!
$ make help
changeset Create a changeset describing a user-facing change (for the next release)
There was a problem hiding this comment.
🎁 suggestion: I think we should include the @changeset/cli package here alongside a lockfile to avoid surprise in updates. IIRC "v3" is in development at the moment!
🍰 ramble: I'm not wanting to add separate documentation for this either! I'm curious if the scripts/changeset_version.sh file and make file might just... re-install the packages? This might be upsetting.
| """Set the ``version`` field of a JSON plugin manifest.""" | ||
| manifest = json.loads(plugin_path.read_text()) | ||
| manifest["version"] = version |
There was a problem hiding this comment.
👁️🗨️ thought: I'm curious if separate functions for different targets might improve maintenance but not a blocker whatsoever-
There was a problem hiding this comment.
🌟 praise: Great to see these scripts extended so well!
| "baseBranch": "main", | ||
| "updateInternalDependencies": "patch", | ||
| "ignore": [], | ||
| "privatePackages": { "version": true, "tag": true } |
There was a problem hiding this comment.
🧮 quibble: A small preference to linebreaks for each argument to avoid missed details when scrolling. But not blocker of course.
What
Automates versioning and releases with Changesets, so maintainers no longer hand-edit version fields or cut releases manually.
How it works
.changeset/describing the change and its semver bump.package.jsonis the version source of truth.scripts/sync_versions.pythen mirrors that version out to.claude-plugin/plugin.jsonand.cursor-plugin/plugin.json.maintriggers.github/workflows/release.yml, which useschangesets/actionto open/update a draft "chore: release" PR, bumps the version, and updates the changelog.npx @changesets/cli publish.Config & conventions
.changeset/config.json: private package (privatePackages: { version, tag }),baseBranch: main, frontmatter key is always"slack".