Repository navigation
build(release): Let craft pick the version bump - #164
Merged
Merged
Conversation
The workflow computed the next version with uv from a manually chosen bump type, so a breaking PR (`type!:` title) only shipped as a major release if whoever ran the release remembered to pick "major". Passing "auto" to craft instead derives the bump from the conventional-commit PR titles since the last tag. The explicit bump types stay available as overrides, and craft resolves them against the last tag too, so the uv calculation step is no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
giovanni-guidini
approved these changes
Oct 23, 2026
vaind
added a commit
that referenced
this pull request
Oct 26, 2026
## Problem Since #164, releases default to `version: auto`. Craft resolved it correctly and prepared `release/2.0.0`. But the pinned `getsentry/action-prepare-release` v1.6.6 titles the publish issue with the raw input, so it requested `getsentry/scm-platform@auto` (getsentry/publish#10017). The publish workflow takes the version from that title, so approving the issue would run `craft publish auto`. ## Approach Switch to the same action, which now lives in the craft repo (`getsentry/craft`), pinned to 3.0.0. It titles the issue with the version craft resolved (`RESOLVED_VERSION` in its `action.yml`). The inputs we pass (`version`, `force`, `GITHUB_TOKEN`) are unchanged. sentry-dotnet already uses this action. None of 3.0.0's breaking changes apply here: - **Changelog path without workspaces is rejected:** we don't set a changelog path. - **`prepare` fails when automatic bumping finds nothing:** our `preReleaseCommand` does the bump, so craft's automatic bumping never runs. - **nuget workspaces:** not a target here. Checked with actionlint. Before the next release run, retract getsentry/publish#10017 and delete the `release/2.0.0` branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The release workflow computes the next version with
uv version --bumpfrom a bump type picked by hand. A breaking PR (atype!:title, e.g. #162) only becomes a major release if the person running the release remembers to pickmajor.Approach
action-prepare-release, which hands it tocraft prepare. The new default isauto: 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).minor/patch/majoras manual overrides. Craft resolves those against the last tag too, so the uv calculation step is removed. uv is still installed becausescripts/bump-version.shwrites the chosen version with it.autoand bump types are supported from craft 2.14, below ourminVersionof 2.21.1.autofails 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