Skip to content

build(release): Enable craft's auto changelog - #163

Merged
vaind merged 1 commit into
mainfrom
ivan/craft-changelog-setup-5b1b9a
Oct 23, 2026
Merged

vaind merged 1 commit into
mainfrom
ivan/craft-changelog-setup-5b1b9a

Conversation

@vaind

@vaind vaind commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

GitHub releases have empty bodies. .craft.yml sets no changelog policy, so craft defaults to none and skips the changelog. Craft's github target can only take the release body from the changelog file, so it publishes an empty release.

Approach

Set changelog.policy: auto, matching our other craft-released repos (craft, sentry, devservices, …). On craft prepare, craft writes a section built from merged PRs into CHANGELOG.md (creating the file on the first release), commits it with the version bump, and the github target uses that section as the release body. Entries are grouped by conventional-commit type, since there's no .github/release.yml.

The next release will cover everything since 1.11.0. Earlier releases are not backfilled.

🤖 Generated with Claude Code

Without a changelog policy craft defaults to "none", so recent GitHub
releases (1.9.0-1.11.0) were published with empty bodies. The github
target takes the release body from the changelog file, so "auto" makes
craft write CHANGELOG.md from merged PRs at prepare time, the same way
our other library repos do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vaind
vaind requested a review from a team as a code owner October 23, 2026 06:36
@vaind
vaind merged commit 8e39a29 into main Oct 23, 2026
14 checks passed
vaind added a commit that referenced this pull request Oct 26, 2026
## Problem

The release workflow computes the next version with `uv version --bump`
from a bump type picked by hand. A breaking PR (a `type!:` title, e.g.
#162) only becomes a major release if the person running the release
remembers to pick `major`.

## Approach

- Pass the workflow input straight to `action-prepare-release`, which
hands it to `craft prepare`. The new default is `auto`: craft finds the
highest bump among the PR titles since the last tag, using its built-in
conventional-commit categories (`type!:` → major, `feat:` → minor,
everything else → patch).
- Keep `minor`/`patch`/`major` as manual overrides. Craft resolves those
against the last tag too, so the uv calculation step is removed. uv is
still installed because `scripts/bump-version.sh` writes the chosen
version with it.

`auto` and bump types are supported from craft 2.14, below our
`minVersion` of 2.21.1. `auto` fails the release with a clear message if
there are no new commits, or if none of them has a conventional-commit
title. Pick an explicit bump in that case.

This works on its own, but pairs with #163, which turns on the changelog
these categories feed into.

Checked with actionlint. The real test is the next release run.

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@vaind
vaind deleted the ivan/craft-changelog-setup-5b1b9a branch October 26, 2026 07:46
vaind added a commit that referenced this pull request Oct 26, 2026
## Problem

The README's release steps date from before #163–#165. They tell you to
pick a bump type, say the version comes from `pyproject.toml`, and name
`getsentry/action-prepare-release`. Following them skips craft's `auto`
versioning, so a breaking PR could ship as a minor release.

## Approach

Update the "Releasing a New Version" steps to match the current
workflow:
- run with the default `auto`, and how PR titles map to
major/minor/patch, with the explicit bump types kept as overrides;
- what the workflow produces: the `release/<version>` branch, the
`CHANGELOG.md` section, and the publish issue to check;
- what happens after **accepted**: CI gate, PyPI/internal index/GitHub
release, release branch merged into `main`;
- PR titles must follow conventional commits, with `!` for breaking
changes.

The manual `getsentry/pypi` step, adding `python_versions = >=3.13` to
its PR, is removed. Since getsentry/pypi#2639, that repository's build
skips Python versions excluded by a package's `Requires-Python`. The
2.0.0 PR (getsentry/pypi#2669) merged without the line, and its build
skipped 3.11 and 3.12 on its own.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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