mirror of
https://github.com/astral-sh/uv
synced 2026-01-21 05:20:09 -05:00
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) | action | major | `v5.4.2` -> `v6.0.0` | --- ### Release Notes <details> <summary>astral-sh/setup-uv (astral-sh/setup-uv)</summary> ### [`v6.0.0`](https://redirect.github.com/astral-sh/setup-uv/releases/tag/v6.0.0): 🌈 activate-environment and working-directory [Compare Source](https://redirect.github.com/astral-sh/setup-uv/compare/v5.4.2...v6.0.0) ##### Changes This version contains some breaking changes which have been gathering up for a while. Lets dive into them: - [Activate environment](#activate-environment) - [Working Directory](#working-directory) - [Default `cache-dependency-glob`](#default-cache-dependency-glob) - [Use default cache dir on self hosted runners](#use-default-cache-dir-on-self-hosted-runners) ##### 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): ```yaml - 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`](https://docs.astral.sh/uv/pip/environments/) 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. ```yaml - 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](https://redirect.github.com/ssbarnea) found out that the default `cache-dependency-glob` was not suitable for a lot of users. The old default ```yaml cache-dependency-glob: | **/requirements*.txt **/uv.lock ``` is changed and should cover over 99.5% of use cases: ```yaml 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](https://docs.astral.sh/uv/concepts/cache/#cache-directory) is used instead. ##### 🚨 Breaking changes - Change default cache-dependency-glob [@​eifinger](https://redirect.github.com/eifinger) ([#​352](https://redirect.github.com/astral-sh/setup-uv/issues/352)) - No default UV_CACHE_DIR on selfhosted runners [@​eifinger](https://redirect.github.com/eifinger) ([#​380](https://redirect.github.com/astral-sh/setup-uv/issues/380)) - new inputs activate-environment and working-directory [@​eifinger](https://redirect.github.com/eifinger) ([#​381](https://redirect.github.com/astral-sh/setup-uv/issues/381)) ##### 🧰 Maintenance - chore: update known checksums for 0.6.16 @​[github-actions\[bot\]](https://redirect.github.com/apps/github-actions) ([#​378](https://redirect.github.com/astral-sh/setup-uv/issues/378)) - chore: update known checksums for 0.6.15 @​[github-actions\[bot\]](https://redirect.github.com/apps/github-actions) ([#​377](https://redirect.github.com/astral-sh/setup-uv/issues/377)) ##### 📚 Documentation - bump to v6 in README [@​eifinger](https://redirect.github.com/eifinger) ([#​382](https://redirect.github.com/astral-sh/setup-uv/issues/382)) - log info on venv activation [@​eifinger](https://redirect.github.com/eifinger) ([#​375](https://redirect.github.com/astral-sh/setup-uv/issues/375)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/uv). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
# Sync Python releases and create a pull request.
|
|
#
|
|
# Based on: https://github.com/astral-sh/rye/blob/57b7c089e494138aae29a130afb2e17f447970bf/.github/workflows/sync-python-releases.yml
|
|
name: "Sync Python downloads"
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
sync:
|
|
if: github.repository == 'astral-sh/uv'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- uses: astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04 # v6.0.0
|
|
with:
|
|
version: "latest"
|
|
enable-cache: true
|
|
- name: Sync Python Releases
|
|
run: |
|
|
uv run -- fetch-download-metadata.py
|
|
uv run -- minify-download-metadata.py
|
|
working-directory: ./crates/uv-python
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: "Create Pull Request"
|
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
|
with:
|
|
commit-message: "Sync latest Python releases"
|
|
add-paths: |
|
|
crates/uv-python/download-metadata.json
|
|
crates/uv-python/src/download-metadata-minified.json
|
|
branch: "sync-python-releases"
|
|
title: "Sync latest Python releases"
|
|
body: "Automated update for Python releases."
|
|
base: "main"
|