Releases: astral-sh/setup-uv
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)
📚 Documentation
v4.0.0 🌈 Fail when cache local path does not exist when trying to cache
🚨 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.
Changes
🚨 Breaking changes
🐛 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
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
- Bump @types/node from 22.9.0 to 22.9.1 @dependabot (#157)
- Bump @vercel/ncc from 0.38.2 to 0.38.3 @dependabot (#155)
v3.2.3 🌈 update known checksums for 0.5.2
v3.2.2 🌈 Avoid leftover files by using temp dir
v3.2.1 🌈 Fix extracting with old PowerShell versions
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
- Bump @actions/cache from 3.2.4 to 3.3.0 @dependabot (#143)
- Bump @types/node from 22.8.6 to 22.9.0 @dependabot (#146)
- Bump @types/node from 22.7.9 to 22.8.6 @dependabot (#142)
v3.2.0 🌈 add option to disable cache pruning
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
- feat: add option to disable cache pruning @merlinz01 (#134)
🧰 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
- Bump @types/node from 22.7.8 to 22.7.9 @dependabot (#132)
- Bump @types/node from 22.7.7 to 22.7.8 @dependabot (#131)
- Bump @types/node from 22.7.6 to 22.7.7 @dependabot (#129)
- Bump @types/node from 22.7.5 to 22.7.6 @dependabot (#123)
- Bump @biomejs/biome from 1.9.3 to 1.9.4 @dependabot (#127)
v3.1.7 🌈 update known checksums for 0.4.21
v3.1.6 🌈 Fix cache linebreak in linux runner
v3.1.5 🌈 update known checksums for 0.4.20
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
- Bump @types/node from 22.7.4 to 22.7.5 @dependabot (#114)
- Bump @biomejs/biome from 1.9.2 to 1.9.3 @dependabot (#110)