Releases: astral-sh/setup-uv
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
🐛 Bug fixes
v5.2.0 🌈 Detect required-version from config file
This release adds support to derive the version of uv to be installed from pyproject.toml
and uv.toml
files.
If no version
input is defined the default is now to look for a required-version in uv.toml
and then pyproject.toml
in the repository root. If it cannot find any it falls back to latest
.
If your files are at a different place you can use the new inputs uv-file
or pyproject-file
.
🐛 Bug fixes
- Add venv/bin as absolute path to PATH @op (#241)
- fix: make sure VIRTUAL_ENV is an absolute path @samypr100 (#224)
🚀 Enhancements
🧰 Maintenance
- chore: update known checksums for 0.5.20 @github-actions (#238)
- chore: update known checksums for 0.5.19 @github-actions (#237)
- chore: update known checksums for 0.5.18 @github-actions (#232)
- chore: update known checksums for 0.5.17 @github-actions (#231)
- chore: update known checksums for 0.5.16 @github-actions (#228)
- chore: update known checksums for 0.5.15 @github-actions (#225)
- chore: update known checksums for 0.5.14 @github-actions (#222)
- chore: update known checksums for 0.5.12 @github-actions (#214)
📚 Documentation
⬆️ Dependency updates
- Bump @octokit/rest from 21.0.2 to 21.1.0 @dependabot (#229)
- Bump typescript from 5.7.2 to 5.7.3 @dependabot (#230)
- Bump @types/node from 22.10.5 to 22.10.6 @dependabot (#236)
- Bump @types/node from 22.10.3 to 22.10.5 @dependabot (#223)
- Bump @types/node from 22.10.2 to 22.10.3 @dependabot (#220)
- Bump peter-evans/create-pull-request from 7.0.5 to 7.0.6 @dependabot (#218)
v5.1.0 🌈 Fewer cache invalidations
Changes
This release includes less frequently invalidated caches and a fix for setting the correct VIRTUAL_ENV
🐛 Bug fixes
🚀 Enhancements
📚 Documentation
v5.0.1 🌈 The christmas elves overlooked something
Changes
With so many breaking changes so close to the end of the year we missed something.
Thank you @ryanhiebert for quickly reporting that our new defaults fail the workflow if neither a uv.lock
nor a requirements*.txt
can be found. This is now a warning instead.
🐛 Bug fixes
v5.0.0 🎄 Merry Christmas - Help fastly and users by default
Changes
This christmans 🎄 release is a bit early bit still full of presents 🎁
Since we are changing some of the defaults this can lead to breaking changes, thus the major version increase.
Here are the highlights:
Default to enable-cache: true on GitHub hosted runners
Did you know that that Fastly, the company hosting PyPI, theoretically has to pay $12.5 million per month and so far have served more than 2.41 exabytes of data?
This is why they asked us to turn on caching by default. After weighting the pros and cons we decided to automatically upload the cache to the GitHub Actions cache when running on GitHub hosted runners. You can still disable that with enable-cache: false
.
I remember when I first got into actions and didn't understand all the magic. I was baffled that some actions did something behind the scenes to make everything faster. I hope with this change we help a lot of users who are don't want to or are afraid to understand what enable-cache
does.
Add **/requirements*.txt to default cache-dependency-glob
If caching is enabled we automatically searched for a uv.lock
file and when this changed we knew we had to refresh the cache. A lot of projects don't use this but rather the good old requirements.txt
. We now automatically search for both uv.lock
and requirements*.txt
(this means also requirements-test.txt
, requirements-dev.txt
, ...) files.
You can change this with cache-dependency-glob
Auto activate venv when python-version is set
Some workflows install packages on the fly. This automatically works when using a python version that is already present on the runner. But if uv installs the version, e.g. because it is a free-threaded version or an old one, it is a standalone-build and installing packages "into the system" is not possible.
We now automatically create a new virtual environment with uv venv
and activate it for the rest of the workflow if python-version
is used. This means you can now do
- name: Install uv
uses: astral-sh/setup-uv@auto-environment
with:
python-version: 3.13t
- run: uv pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
🚨 Breaking changes
- Default to enable-cache: true on GitHub hosted runners @eifinger (#193)
- Add **/requirements*.txt to default cache-dependency-glob @eifinger (#185)
🐛 Bug fixes
🚀 Enhancements
- Auto activate venv when python-version is set @eifinger (#194)
- Add python version to cache key @eifinger (#187)
🧰 Maintenance
- chore: update known checksums for 0.5.11 @github-actions (#198)
- chore: update known checksums for 0.5.10 @github-actions (#196)
- chore: update known checksums for 0.5.9 @github-actions (#195)
- chore: update known checksums for 0.5.8 @github-actions (#190)
- chore: update known checksums for 0.5.7 @github-actions (#183)
- chore: update known checksums for 0.5.6 @github-actions (#179)
📚 Documentation
⬆️ Dependency updates
- Bump @types/node from 22.10.1 to 22.10.2 @dependabot (#189)
- Update dependencies @eifinger (#186)
v4.2.0 🌈 Resolve latest version instead of downloading latest release
Changes
We got a frist contribution from @pollenjp!
Thanks to this we are now resolving the latest version and try to find it in the local cache instead of always downloading the latest release from the uv repository.
This new approach is not only more efficient, it also fixes a latent bug in the self-hosted runners tools cache and makes the code more maintainable.
Thank you @pollenjp!
🚀 Enhancements
🧰 Maintenance
v4.1.0 🌈 Set UV_PYTHON for your workflow
Changes
You can now use the input python-version
to set the environment variable UV_PYTHON
for the rest of your workflow.
This will override any python version specifications in pyproject.toml
and .python-version
- name: Install the latest version of uv and set the python version to 3.12
uses: astral-sh/setup-uv@v4
with:
python-version: "3.12"
You can combine this with a matrix to test multiple python versions:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
- name: Test with python ${{ matrix.python-version }}
run: uv run --frozen pytest
🚀 Enhancements
🧰 Maintenance
- Reduce test matrices @eifinger (#173)
- chore: update known checksums for 0.5.5 @github-actions (#170)
- Speed up updating known checksums @eifinger (#166)