Add resolved Python version output for activated environments

This commit is contained in:
William Woodruff
2026-09-03 15:01:47 -04:00
parent e105c8fb1d
commit 3956519c9e
9 changed files with 292 additions and 7 deletions
+13
View File
@@ -17,6 +17,19 @@ This allows directly using it in later steps:
By default, the venv is created at `.venv` inside the `working-directory`.
With `activate-environment: true`, the `python-version-resolved` output contains the
venv's full Python version, as reported by `platform.python_version()`. For example,
a `python-version` input of `3.15t` can resolve to `3.15.0rc1`. Use
`${{ steps.setup-uv.outputs.python-version-resolved }}` in later steps to access
the resolved version (with `id: setup-uv` on the setup step).
This is the Python language version: it includes prerelease suffixes, but no
implementation name or free-threaded marker. For cache keys that distinguish PyPy
from CPython or free-threaded builds, include the requested version as well.
The output is empty when `activate-environment` is false or the version cannot be
determined. The existing `python-version` output and setup-uv's cache keys are
unaffected.
You can customize the venv location with `venv-path`, for example to place it in the runner temp directory:
```yaml