Releases: astral-sh/setup-uv
v6.1.0 🌈
Changes
This release adds the input server-url
which defaults to https://github.com
. You can set this to a custom url to control where this action downloads the uv release from. This is useful for users of gitea and comparable solutions.
@sebadevo pointed out that we don't invalidate the cache when the prune-cache
input is changed. This leads to unnessecarily big caches. The input is now used to compute the cache key, properly invalidating the cache when it is changed.
Note
For most users this release will invalidate the cache once.
You will see the known warning no-github-actions-cache-found-for-key
This is expected and will only appear once.
🐛 Bug fixes
🚀 Enhancements
🧰 Maintenance
- chore: update known versions for 0.7.7 @github-actions[bot] (#422)
- chore: update known versions for 0.7.6 @github-actions[bot] (#415)
- chore: update known versions for 0.7.5 @github-actions[bot] (#412)
- chore: update known versions for 0.7.4 @github-actions[bot] (#410)
- chore: update known versions for 0.7.3 @github-actions[bot] (#405)
- Fix path to known-checksums.ts @eifinger (#404)
- Fix update-known-versions workflow argument @eifinger (#401)
- Fix update-known-versions workflow @eifinger (#400)
- Create version-manifest.json on uv release @eifinger (#399)
- Run infrastructure workflows on arm runners @eifinger (#396)
- chore: update known checksums for 0.7.2 @github-actions[bot] (#395)
- chore: update known checksums for 0.7.0 @github-actions[bot] (#390)
📚 Documentation
⬆️ Dependency updates
- Bump dependencies @eifinger (#424)
- Bump typescript from 5.8.2 to 5.8.3 @dependabot[bot] (#393)
v6.0.1 🌈 Fix default cache dependency glob
Changes
The new default in v6 used illegal patterns and therefore didn't match requirements files. This is now fixed.
🐛 Bug fixes
🧰 Maintenance
- chore: update known checksums for 0.6.17 @github-actions[bot] (#384)
⬆️ Dependency updates
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 the python-version
input or the files pyproject.toml
, uv.toml
, .python-version
in the working-directory
.
Working Directory
The new input working-directory
controls where we look for pyproject.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
and uv-file
have been removed.
Default cache-dependency-glob
@ssbarnea found out that the default cache-dependency-glob
was not suitable for a lot of users.
The old default
cache-dependency-glob: |
**/requirements*.txt
**/uv.lock
is changed and should cover over 99.5% of use cases:
cache-dependency-glob: |
**/*(requirements|constraints)*.(txt|in)
**/pyproject.toml
**/uv.lock
Note
This shouldn't be a breaking change. The only thing you may notice is that your caches get invalidated once.
Use default cache dir on self hosted runners
The directory where uv stores its cache was always set to a directory in RUNNER_TEMP
. For self-hosted runners this made no sense as this gets cleaned after every run and led to slower runs than necessary.
On self-hosted runners UV_CACHE_DIR
is no longer set and the default cache directory is used instead.
🚨 Breaking changes
- Change default cache-dependency-glob @eifinger (#352)
- No default UV_CACHE_DIR on selfhosted runners @eifinger (#380)
- new inputs activate-environment and working-directory @eifinger (#381)
🧰 Maintenance
- chore: update known checksums for 0.6.16 @github-actions[bot] (#378)
- chore: update known checksums for 0.6.15 @github-actions[bot] (#377)
📚 Documentation
v5.4.2 🌈 Make sure uv installed by setup-uv is first in PATH
Changes
This release fixes an issue on self-hosted runners.
If you manually installed uv with version 0.5.0 or later this version would overwrite the uv version installed by this action.
We now make sure the version installed by this action is the first found in PATH
🐛 Bug fixes
🧰 Maintenance
- chore: update known checksums for 0.6.14 @github-actions[bot] (#366)
- chore: update known checksums for 0.6.13 @github-actions[bot] (#365)
- chore: update known checksums for 0.6.12 @github-actions[bot] (#362)
- chore: update known checksums for 0.6.11 @github-actions[bot] (#357)
📚 Documentation
v5.4.1 🌈 Add support for pep440 version specifiers
Changes
With this release you can also use pep440 version specifiers as required-version
in filesuv.toml
, pyroject.toml
and in the version
input:
- name: Install a pep440-specifier-satisfying version of uv
uses: astral-sh/setup-uv@v5
with:
version: ">=0.4.25,<0.5"
🐛 Bug fixes
🧰 Maintenance
- chore: update known checksums for 0.6.10 @github-actions[bot] (#345)
📚 Documentation
v5.4.0 🌈 uv and uvx path as outputs
Changes
The absolute paths to the uv and uvx binaries can now be accessed via the outputs uv-path
and uvx-path
.
setup-uv
now also issues a warning if the working directory is empty. This makes users aware of the common mistake to run setup-uv
before actions/checkout
. You can remove the warning by setting ignore-empty-workdir: true
🚀 Enhancements
🧰 Maintenance
- chore: update known checksums for 0.6.9 @github-actions[bot] (#339)
- Merge workflows and add all-tests-passed @eifinger (#331)
- chore: update known checksums for 0.6.8 @github-actions[bot] (#332)
- chore: update known checksums for 0.6.7 @github-actions[bot] (#330)
- Set required workflow permissions @eifinger (#329)
- Add workflow_dispatch triggers to every workflow @eifinger (#326)
- Bump dependencies @eifinger (#324)
- Inline action-update-semver @eifinger (#323)
- chore: update known checksums for 0.6.6 @github-actions[bot] (#318)
- chore: update known checksums for 0.6.5 @github-actions[bot] (#313)
📚 Documentation
- Fix wrong warning message in FAQ @eifinger (#337)
- Warn when the workdir is empty @eifinger (#322)
- Remove apk add python3 for musl test @eifinger (#319)
⬆️ Dependency updates
- Bump @actions/cache from 4.0.2 to 4.0.3 @dependabot[bot] (#334)
v5.3.1 🌈 - Fix issues with GHES and HTTP proxies
Changes
This release fixes some issues when this action was used behind a HTTP proxy or with GHES.
If you have been seeing ENOTFOUND
or timeout errors, this release should fix that.
A huge thank you to everyone who helped investigating this and testing the fixes:
🐛 Bug fixes
🧰 Maintenance
- chore: update known checksums for 0.6.3 @github-actions[bot] (#300)
📚 Documentation
⬆️ Dependency updates
- bump dependencies @eifinger (#308)
- Bump peter-evans/create-pull-request from 7.0.6 to 7.0.7 @dependabot[bot] (#299)
v5.3.0 🌈 Support MUSL, s390x and powerpc
In this release we add support for MUSL based systems.
This is helpful if you are running your workflow inside a docker image based on alpine.
Tip
Please be aware that you have to make sure a python interpreter is already present (apk add python3
), see also https://docs.astral.sh/uv/concepts/python-versions/#cpython-distributions and astral-sh/uv#6890
@Zxilly also added support for running this action on self-hosted runners using s390x and powerpc architectures. Thank you!
This release also includes more debug logs which makes tracking down issues easier in the future.
🐛 Bug fixes
🚀 Enhancements
🧰 Maintenance
- chore: update known checksums for 0.6.2 @github-actions[bot] (#295)
- chore: update known checksums for 0.6.1 @github-actions[bot] (#293)
- chore: update known checksums for 0.6.0 @github-actions[bot] (#288)
- chore: update known checksums for 0.5.31 @github-actions[bot] (#277)
- Run update-known-checksums every night @eifinger (#273)
- chore: update known checksums for 0.5.29 @github-actions[bot] (#272)
- chore: update known checksums for 0.5.28 @github-actions[bot] (#270)
- chore: update known checksums for 0.5.27 @github-actions[bot] (#267)
- chore: update known checksums for 0.5.26 @github-actions[bot] (#263)
📚 Documentation
v5.2.2 🌈 Full support for GHES
Changes
This release fixes some issues that prevented use with GitHub Enterprise Server instances.
🐛 Bug fixes
- Do not expect GITHUB_TOKEN to be set or valid @eifinger (#262)
- Fallback if toml file parsing failed @eifinger (#246)
🧰 Maintenance
- chore: update known checksums for 0.5.25 @github-actions[bot] (#259)
- chore: update known checksums for 0.5.24 @github-actions[bot] (#256)
- chore: update known checksums for 0.5.23 @github-actions[bot] (#252)
- chore: update known checksums for 0.5.22 @github-actions[bot] (#250)
- chore: update known checksums for 0.5.21 @github-actions[bot] (#247)
📚 Documentation
⬆️ Dependency updates
- Bump @types/node from 22.10.10 to 22.12.0 @dependabot[bot] (#258)
- Bump release-drafter/release-drafter from 6.0.0 to 6.1.0 @dependabot[bot] (#249)
- Bump @types/node from 22.10.9 to 22.10.10 @dependabot[bot] (#254)
- Bump @types/node from 22.10.7 to 22.10.9 @dependabot[bot] (#253)
- Bump @actions/tool-cache from 2.0.1 to 2.0.2 @dependabot[bot] (#244)
- Bump @types/node from 22.10.6 to 22.10.7 @dependabot[bot] (#243)
v5.2.1 🌈 Support toml spec 1.0.0
v5.2.0 introduced TOML parsing using @iarna/toml because we already found out in astral-sh/ruff-action
that toml has missing features.
As it turns out @iarna/toml also is not fully TOML spec (1.0.0) compliant.
We now use smol-toml