diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 2e279f8..0f4082a 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -44,19 +44,15 @@ jobs: exit 1 fi - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Install build tool (Hatch) - run: | - python -m pip install --upgrade pip - pip install hatch - - name: Build package with Hatch + - name: Install uv + uses: astral-sh/setup-uv@v5 + # `uv build` drives the `hatchling` backend `[build-system]` declares, so + # this is the same sdist and wheel `uv build` produces locally. `uv` + # resolves an interpreter matching `requires-python` on its own, so there + # is no separate Python to set up. + - name: Build package id: build - run: | - hatch clean - hatch build + run: uv build - name: Publish package # No user/password: an explicit password disables Trusted Publishing, # and with it the build attestations this action produces by default. diff --git a/CHANGELOG.md b/CHANGELOG.md index 85cf008..503aee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +### Changed + +- The release workflow builds with `uv build` instead of installing `hatch` + with `pip`. It was the only workflow not going through `uv`, and the second + way to reach the same `hatchling` backend was a way for the release build to + drift from the one every other job and every developer runs. + ### Fixed - The GitHub release no longer depends on the PyPI upload succeeding. It was