Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions python/post-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ 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.
# 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
- name: Download all the dists
uses: actions/download-artifact@v8
with:
Expand Down
Loading