Skip to content

Releases: astral-sh/setup-uv

v5.3.1 🌈 - Fix issues with GHES and HTTP proxies

01 Mar 18:13
f94ec6b
Compare
Choose a tag to compare

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

📚 Documentation

  • 📚 Document automatically enabled cache on GitHub-hosted runners @jerr0328 (#302)

⬆️ Dependency updates

v5.3.0 🌈 Support MUSL, s390x and powerpc

21 Feb 10:15
1edb525
Compare
Choose a tag to compare

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

📚 Documentation

  • Add FAQ on resolution strategy and cache not found warnings @eifinger (#296)

v5.2.2 🌈 Full support for GHES

30 Jan 14:01
4db9619
Compare
Choose a tag to compare

Changes

This release fixes some issues that prevented use with GitHub Enterprise Server instances.

🐛 Bug fixes

🧰 Maintenance

📚 Documentation

⬆️ Dependency updates

v5.2.1 🌈 Support toml spec 1.0.0

16 Jan 15:40
b5f58b2
Compare
Choose a tag to compare

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

16 Jan 09:22
4e3dbec
Compare
Choose a tag to compare

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

  • docs: bump astral-sh/setup-uv to v5 @njzjz (#205)

⬆️ Dependency updates

v5.1.0 🌈 Fewer cache invalidations

23 Dec 17:42
887a942
Compare
Choose a tag to compare

Changes

This release includes less frequently invalidated caches and a fix for setting the correct VIRTUAL_ENV

🐛 Bug fixes

🚀 Enhancements

📚 Documentation

  • Align use of actions/setup-python with uv docu @eifinger (#207)

v5.0.1 🌈 The christmas elves overlooked something

20 Dec 10:45
180f8b4
Compare
Choose a tag to compare

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

20 Dec 08:56
2af22b5
Compare
Choose a tag to compare

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?
image

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.lockand 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

🧰 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

v4.2.0 🌈 Resolve latest version instead of downloading latest release

30 Nov 18:16
38f3f10
Compare
Choose a tag to compare

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

  • Resolve latest version instead of downloading latest release @pollenjp (#178)

🧰 Maintenance

v4.1.0 🌈 Set UV_PYTHON for your workflow

28 Nov 20:51
5f42d5a
Compare
Choose a tag to compare

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)

📚 Documentation