From a70fee1b3da577e2cb74875559a4346dc73bc046 Mon Sep 17 00:00:00 2001 From: Jeffrey 'Alex' Clark Date: Fri, 13 Nov 2026 18:08:22 -0500 Subject: [PATCH 1/2] DRIVERS-3743 Point hatch at the project's uv in post-publish --- python/README.md | 5 +++++ python/post-publish/action.yml | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/python/README.md b/python/README.md index c3335f3..a96a842 100644 --- a/python/README.md +++ b/python/README.md @@ -110,6 +110,11 @@ post-publish: dry_run: ${{ inputs.dry_run }} ``` +Projects that pin uv with `[tool.uv] required-version` must run the setup action +(or otherwise put a compliant `uv` on `PATH`) before this action. Hatch bundles +its own uv and uses it to create its environments, and a bundled uv that violates +the pin makes the version bump fail. + ## uv Lock Update This action runs `uv lock --upgrade` and opens a pull request with the resulting diff --git a/python/post-publish/action.yml b/python/post-publish/action.yml index f542271..7cc9600 100644 --- a/python/post-publish/action.yml +++ b/python/post-publish/action.yml @@ -48,6 +48,17 @@ runs: - name: Install hatch shell: bash run: pipx install hatch + - name: Point hatch at the installed uv + shell: bash + # Hatch bundles its own uv and uses it to create its environments. The + # bundled uv may violate a project's [tool.uv] required-version pin, so + # point hatch at the uv the setup action installed (which honors the + # pin). Without an installed uv this is a no-op and hatch keeps its + # bundled one. + run: | + if command -v uv >/dev/null; then + echo "HATCH_ENV_TYPE_VIRTUAL_UV_PATH=$(command -v uv)" >> "$GITHUB_ENV" + fi - name: Download all the dists uses: actions/download-artifact@v8 with: From bdac5a82a3696b470185d345fb8850b93738b794 Mon Sep 17 00:00:00 2001 From: Jeffrey 'Alex' Clark Date: Fri, 13 Nov 2026 18:10:26 -0500 Subject: [PATCH 2/2] DRIVERS-3743 Add zizmor ignore for GITHUB_ENV write --- python/post-publish/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/post-publish/action.yml b/python/post-publish/action.yml index 7cc9600..d51ea7f 100644 --- a/python/post-publish/action.yml +++ b/python/post-publish/action.yml @@ -55,7 +55,9 @@ runs: # point hatch at the uv the setup action installed (which honors the # pin). Without an installed uv this is a no-op and hatch keeps its # bundled one. - run: | + # GITHUB_ENV is the only way a composite action exports to later steps. + # The value is a single resolved path, so it cannot inject extra lines. + run: | # zizmor: ignore[github-env] if command -v uv >/dev/null; then echo "HATCH_ENV_TYPE_VIRTUAL_UV_PATH=$(command -v uv)" >> "$GITHUB_ENV" fi