From bfbe3ffc9e9b0c900841a93c80421ae09c0f1009 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Fri, 23 Oct 2026 08:44:40 +0200 Subject: [PATCH] build(release): Let craft pick the version bump 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 --- .github/workflows/release.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a48f98e..7bdb8c28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,11 +4,12 @@ on: workflow_dispatch: inputs: bump: - description: Version bump type + description: Version bump type (auto picks it from the PR titles since the last release) required: true type: choice - default: minor + default: auto options: + - auto - minor - patch - major @@ -40,22 +41,15 @@ jobs: fetch-depth: 0 fetch-tags: true + # scripts/bump-version.sh runs uv to write the version craft picks. - name: Install uv uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 - - name: Calculate version - id: version - env: - BUMP: ${{ inputs.bump }} - run: | - set -euo pipefail - NEW=$(uv version --bump "$BUMP" --dry-run --short) - echo "new=$NEW" >> "$GITHUB_OUTPUT" - + # Craft resolves "auto" and the bump types against the last release tag. - name: Prepare release uses: getsentry/action-prepare-release@c8e1c2009ab08259029170132c384f03c1064c0e # v1.6.6 env: GITHUB_TOKEN: ${{ steps.token.outputs.token }} with: - version: ${{ steps.version.outputs.new }} + version: ${{ inputs.bump }} force: ${{ inputs.force }}