Sourced from astral-sh/setup-uv's releases.
v6.0.0 🌈 activate-environment and working-directory
Changes
This version contains some breaking changes which have been gathering up for a while. Lets dive into them:
- Activate environment
- Working Directory
- Default
cache-dependency-glob
- Use default cache dir on self hosted runners
Activate environment
In previous versions using the input
python-version
automatically activated a venv at the repository root. This led to some unwanted side-effects, was sometimes unexpected and not flexible enough.The venv activation is now explicitly controlled with the new input
activate-environment
(false by default):- name: Install the latest version of uv and activate the environment uses: astral-sh/setup-uv@v6 with: activate-environment: true - run: uv pip install pip
The venv gets created by the
uv venv
command so the python version is controlled by thepython-version
input or the filespyproject.toml
,uv.toml
,.python-version
in theworking-directory
.Working Directory
The new input
working-directory
controls where we look forpyproject.toml
,uv.toml
and.python-version
files which are used to determine the version of uv and python to install.It can also be used to control where the venv gets created.
- name: Install uv based on the config files in the working-directory uses: astral-sh/setup-uv@v6 with: working-directory: my/subproject/dir
[!CAUTION]
The inputs
pyproject-file
anduv-file
have been removed.Default
cache-dependency-glob
@​ssbarnea
found out that the defaultcache-dependency-glob
was not suitable for a lot of users.The old default
... (truncated)
6b9c606
Bump dependencies (#389)ef6bcdf
Fix default cache dependency glob (#388)9a31171
chore: update known checksums for 0.6.17 (#384)c7f87aa
bump to v6 in README (#382)aadfaf0
Change default cache-dependency-glob (#352)a0f9da6
No default UV_CACHE_DIR on selfhosted runners (#380)ec4c691
new inputs activate-environment and working-directory (#381)aa12905
chore: update known checksums for 0.6.16 (#378)fcaddda
chore: update known checksums for 0.6.15 (#377)fb3a0a9
log info on venv activation (#375)