changelogs
A Rust rewrite of changesets for Cargo workspaces.
Quick Start
# Initialize changelogs in your workspace
# Add a changelog for your changes
# See what would be released
# Apply version bumps and generate changelogs
Workflows
flowchart LR
subgraph Development
A[Make Changes] --> B[Open PR]
B --> C{AI generates<br/>changelog}
C --> D[Merge PR]
end
subgraph Release
D --> E[/RC PR created with changelog/]
E --> F[Merge RC PR]
F --> G[/📦 Packages released/]
end
Development
- Implement feature & make changes to your code
- Open a PR to propose your changes
- Changelogs are auto-generated via AI (if
wevm/changelogs-rs/genaction set up) - Changelogs can be manually generated with
changelogs add
- Changelogs are auto-generated via AI (if
- Merge the PR
- Changelogs are kept in the
.changelog/directory
- Changelogs are kept in the
Release (Candidate)
- Pushes to main trigger the Release Candidate workflow
- Workflow creates or updates a Release Candidate PR with RC changelog
- Merge the PR to release and publish the changelog
Commands
| Command | Description |
|---|---|
init |
Initialize .changelog/ directory |
add |
Create a new changelog interactively |
add --ai "claude -p" |
Generate changelog using AI |
status |
Show pending changelogs and releases |
version |
Apply version bumps and update changelogs |
publish |
Publish unpublished packages to crates.io |
Python Support
Changelogs supports Python packages using PEP 621 pyproject.toml files.
Requirements
- PEP 621 metadata: Your
pyproject.tomlmust have a[project]section withnameandversion - Static version: Dynamic versions (
dynamic = ["version"]) are not supported - Semantic versioning: Versions must be valid semver (e.g.,
1.2.3, not PEP 440 epochs or local versions) - Build tools:
python -m buildandtwinemust be installed
Setup
# Install build dependencies
# Initialize changelogs
Publishing
# Publish to PyPI (uses TWINE_USERNAME/TWINE_PASSWORD or ~/.pypirc)
For CI, set TWINE_USERNAME and TWINE_PASSWORD environment variables (use __token__ as username for API tokens).
GitHub Actions for Python
name: Release
on:
push:
branches:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install build twine
- uses: wevm/changelogs-rs@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
Limitations
- Single-package repos only (no Python monorepo support)
- PEP 621
pyproject.tomlonly (nosetup.pyorsetup.cfg) - Semantic versioning only (no PEP 440 epochs, post releases, or local versions)
Configuration
.changelog/config.toml:
# How to bump packages that depend on changed packages
= "patch" # patch, minor, or none
[]
= "per-crate" # or "root"
# Fixed groups: all always share the same version
[[]]
= ["crate-a", "crate-b"]
# Linked groups: versions sync when released together
[[]]
= ["sdk-core", "sdk-macros"]
# Packages to ignore
= []
Changelog Format
.changelog/brave-lions-dance.md:
my-crate: minor
other-crate: patch
Added new feature X that does Y.
Fixed bug Z in the parser.
GitHub Actions
Auto-generate Changelogs on PRs
name: Changelog
on:
pull_request:
types:
jobs:
changelog:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- run: npm install -g @sourcegraph/amp
- uses: wevm/changelogs-rs/gen@master
with:
ai: 'amp -x'
env:
AMP_API_KEY: ${{ secrets.AMP_API_KEY }}
Create RC PR or Release
name: Release
on:
push:
branches:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wevm/changelogs-rs@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
The release action automatically handles both versioning and publishing:
- If changelogs exist → Creates/updates a "Version Packages" PR
- If no changelogs (PR was just merged) → Publishes unpublished packages to crates.io
Action Inputs
| Input | Description | Default |
|---|---|---|
crate-token |
Crates.io API token for publishing | - |
commit |
Commit message for version bump | Version Packages |
conventional-commit |
Use conventional commit format | false |
branch |
Branch name for the version PR | changelog-release/main |
Action Outputs
| Output | Description |
|---|---|
hasChangelogs |
Whether there are pending changelogs |
pullRequestNumber |
The PR number if created/updated |
published |
Whether packages were published |
publishedPackages |
JSON array of published packages |
Installation
Pre-built binaries (recommended)
|
Or download directly from GitHub Releases:
| Platform | Download |
|---|---|
| Linux (x86_64) | changelogs-linux-amd64 |
| macOS (Intel) | changelogs-darwin-amd64 |
| macOS (Apple Silicon) | changelogs-darwin-arm64 |
From source
License
MIT OR Apache-2.0