Skip to content

feat: add changes Rust CLI for release process management#7837

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/create-changes-cli-tool
Draft

feat: add changes Rust CLI for release process management#7837
Copilot wants to merge 3 commits into
mainfrom
copilot/create-changes-cli-tool

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Introduces changes, a Rust CLI in changes/ that owns the full release lifecycle for packages in this monorepo — creating changesets, versioning, publishing to npm, and coordinating release branches via GitHub Actions.

CLI (changes/)

Five subcommands, all supporting --package to scope to individual packages or sets:

Command Purpose
changes add Create a .changeset/<id>.md file — interactive (prompts) or fully non-interactive via flags
changes version Apply pending changesets: bump package.json versions, update CHANGELOG.md, remove consumed changeset files
changes publish Publish unpublished versions to npm, push git tags (name@version), create autogenerated GitHub releases via gh
changes release Create release/YYYY-MM-DD branch, optionally cherry-pick commits, run versioning, commit + push, open PR to main
changes status Summarise pending changesets and the version bumps they will produce
# Non-interactive changeset creation (CI-friendly)
changes add --package @primer/react --bump minor --message "Add new Dialog size variants"

# Release a single package, cherry-picking a hotfix commit
changes release --package @primer/react --cherry-pick abc1234

# Dry-run to preview what would be published
changes publish --dry-run

GitHub Actions

  • changes-prepare-release.yml — Runs weekly (Monday 10:00 UTC) or via workflow_dispatch. Accepts packages, date, cherry_picks, and dry_run inputs. Calls changes release to create the branch and open the PR.
  • changes-publish.yml — Triggers on merge of any release/* PR into main, or manually for on-demand publishes. Builds packages then calls changes publish.

Changelog

New

  • changes/ — Rust binary with add, version, publish, release, and status subcommands
  • .github/workflows/changes-prepare-release.yml — weekly scheduled release branch + PR workflow
  • .github/workflows/changes-publish.yml — publish-on-merge workflow for release/* PRs

Changed

  • .gitignore — excludes changes/target/ (Rust build artifacts)

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; tooling-only addition, no package API changes

Testing & Reviewing

Build and run locally:

cargo build --release --manifest-path changes/Cargo.toml
./changes/target/release/changes status
./changes/target/release/changes release --dry-run

The --dry-run flag on both release and publish lets you verify the full flow without creating branches, pushing tags, or calling npm.

Merge checklist

Original prompt

I want you to help me make a cli in rust to help us manage our release process. For now, it can just be called changes and the source should live in the changes folder. This release cli should allow us to: - Create changesets for packages in the workspace, describing changes and the semver bumps that correspond to them - Version packages in the workspace based on changesets - Publish packages to npm and create appropriate tags/github releases for them In addition, it should also allow us to: - Release individual packages - Be coordinated through github actions Our release process that we want is as follows: - At some cadence every week, we will publish a release of packages that need it - This should create a new release branch, maybe release/ or release/version (whatever makes sense) - This branch should look to publish all the changesets added - It should create a pull request that removes them that merges into main (or release branch) and this propagates to the other when merged. it should also version the changes - When merged, tags should be created and publish workflows should run (feel free to create these, you do not have to reuse what we have) We may also need to cherry pick commits over into this release branch for patch releases so consider that We may also only want to publish a single package (or a set of packages) so consider that, as well For releases on gh, feel free to just use the autogenerated ones for now

Created from Copilot CLI via the copilot delegate command.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 13, 2026

⚠️ No Changeset found

Latest commit: dd179e1

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

Copilot AI and others added 2 commits May 13, 2026 21:28
- changes add     – create changesets interactively or with flags
- changes version – apply changesets, bump versions, update changelogs
- changes publish – publish to npm, create git tags and GitHub releases
- changes release – create release branch + PR (supports cherry-picks)
- changes status  – show pending changesets and version bumps

GitHub Actions:
- changes-prepare-release.yml – weekly release branch + PR workflow
- changes-publish.yml         – publish on release PR merge

Updates .gitignore to exclude changes/target/

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
- versioning: fix off-by-one in changelog section insertion
- workspace: use 2-space JSON indentation via custom serde formatter
- publish: remove duplicate tag_name computation in publish loop
- changeset: capture SystemTime::now() once to avoid race condition in ID generation

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CLI tool for managing release process feat: add changes Rust CLI for release process management May 13, 2026
Copilot AI requested a review from joshblack May 13, 2026 21:33
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.

2 participants