Skip to content

Releases: astral-sh/setup-uv

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

v4.0.0 🌈 Fail when cache local path does not exist when trying to cache

23 Nov 16:15
d8db0a8
Compare
Choose a tag to compare

🚨 Breaking change 🚨

By default, the action will now fail if caching is enabled but there is nothing to upload (the uv cache directory does not exist).
If you want to ignore this, set the ignore-nothing-to-cache input to true.

- name: Ignore nothing to cache
  uses: astral-sh/setup-uv@v3
  with:
    enable-cache: true
    ignore-nothing-to-cache: true

In previous releases only an error got logged when saving the cache failed. In most cases users did not realize something was wrong with their config.

image

Changes

🚨 Breaking changes

  • Fail when cache local path does not exist when trying to cache @eifinger (#163)

🐛 Bug fixes

  • Fail when cache local path does not exist when trying to cache @eifinger (#163)
  • Remove working dir from cacheDependencyGlob error message @eifinger (#162)

📚 Documentation

v3.2.4 🌈 Expand `~` tilde in input paths

23 Nov 08:26
caf0cab
Compare
Choose a tag to compare

This release adds support for expanding the ~ character to the user's home directory for the following inputs:

  • cache-local-path
  • tool-dir
  • tool-bin-dir
  • cache-dependency-glob
- name: Expand the tilde character
  uses: astral-sh/setup-uv@v3
  with:
    cache-local-path: "~/path/to/cache"
    tool-dir: "~/path/to/tool/dir"
    tool-bin-dir: "~/path/to/tool-bin/dir"
    cache-dependency-glob: "~/my-cache-buster"

In order to make this work cache-dependency-glob also got support to glob files outside the working directory:

- name: Define an absolute cache dependency glob
  uses: astral-sh/setup-uv@v3
  with:
    enable-cache: true
    cache-dependency-glob: "/tmp/my-folder/requirements*.txt"

Thank you @fynnsu for raising this issue!

🚀 Enhancements

🧰 Maintenance

  • chore: update known checksums for 0.5.4 @github-actions (#158)
  • chore: update known checksums for 0.5.3 @github-actions (#156)

⬆️ Dependency updates

v3.2.3 🌈 update known checksums for 0.5.2

15 Nov 08:23
e779db7
Compare
Choose a tag to compare

Changes

🧰 Maintenance

  • chore: update known checksums for 0.5.2 @github-actions (#154)
  • chore: update known checksums for 0.5.1 @github-actions (#152)
  • chore: update known checksums for 0.5.0 @github-actions (#151)

v3.2.2 🌈 Avoid leftover files by using temp dir

06 Nov 11:55
2e657c1
Compare
Choose a tag to compare

Changes

The previous release left over downloaded files.

🐛 Bug fixes

v3.2.1 🌈 Fix extracting with old PowerShell versions

05 Nov 21:09
a7e1580
Compare
Choose a tag to compare

Changes

Old PowerShell versions (5.1) have a problem with extracting files without the .zip extension. To fix that we now make sure the extension is part of the filename.

🐛 Bug fixes

🧰 Maintenance

  • chore: update known checksums for 0.4.30 @github-actions (#145)
  • chore: update known checksums for 0.4.29 @github-actions (#140)
  • chore: update known checksums for 0.4.28 @github-actions (#136)

⬆️ Dependency updates

v3.2.0 🌈 add option to disable cache pruning

25 Oct 12:13
3b9817b
Compare
Choose a tag to compare

Changes

Big thanks to @merlinz01 for adding the option to disable the cache pruning prior to saving it to the Github Actions Cache.

This is useful if downloading the GitHub Actions cache is fast and cheap for you but downloading from an index is slow or expensive.

🚀 Enhancements

🧰 Maintenance

  • chore: update known checksums for 0.4.26 @github-actions (#133)
  • chore: update known checksums for 0.4.25 @github-actions (#130)
  • chore: update known checksums for 0.4.24 @github-actions (#126)
  • chore: update known checksums for 0.4.23 @github-actions (#125)

📚 Documentation

⬆️ Dependency updates

v3.1.7 🌈 update known checksums for 0.4.21

15 Oct 11:36
f3bcaeb
Compare
Choose a tag to compare

Changes

🧰 Maintenance

  • Update deps @eifinger (#121)
  • chore: update known checksums for 0.4.21 @github-actions (#120)

v3.1.6 🌈 Fix cache linebreak in linux runner

12 Oct 07:01
f731690
Compare
Choose a tag to compare

Changes

🐛 Bug fixes

v3.1.5 🌈 update known checksums for 0.4.20

09 Oct 07:55
77c28f0
Compare
Choose a tag to compare

Changes

🧰 Maintenance

  • chore: update known checksums for 0.4.20 @github-actions (#115)
  • chore: update known checksums for 0.4.19 @github-actions (#113)

⬆️ Dependency updates