Skip to content

Releases: astral-sh/setup-uv

v6.1.0 🌈

23 May 07:58
f0ec1fc
Compare
Choose a tag to compare

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

📚 Documentation

  • Add section to README explaining if packages are installed by setup-uv @pirate (#398)

⬆️ Dependency updates

v6.0.1 🌈 Fix default cache dependency glob

29 Apr 20:51
6b9c606
Compare
Choose a tag to compare

Changes

The new default in v6 used illegal patterns and therefore didn't match requirements files. This is now fixed.

🐛 Bug fixes

🧰 Maintenance

⬆️ Dependency updates

v6.0.0 🌈 activate-environment and working-directory

24 Apr 14:07
c7f87aa
Compare
Choose a tag to compare

Changes

This version contains some breaking changes which have been gathering up for a while. Lets dive into them:

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

🧰 Maintenance

📚 Documentation

v5.4.2 🌈 Make sure uv installed by setup-uv is first in PATH

16 Apr 11:44
d4b2f3b
Compare
Choose a tag to compare

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

  • Make sure uv installed by setup-uv is first in PATH @eifinger (#373)

🧰 Maintenance

📚 Documentation

v5.4.1 🌈 Add support for pep440 version specifiers

30 Mar 16:30
0c5e2b8
Compare
Choose a tag to compare

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

📚 Documentation

v5.4.0 🌈 uv and uvx path as outputs

21 Mar 14:05
2269511
Compare
Choose a tag to compare

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

📚 Documentation

⬆️ Dependency updates

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