diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a48f98..7bdb8c2 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 }}