@@ -30,18 +30,28 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
3030
3131## Usage
3232
33- ### Install the latest version (default)
33+ ### Install a required- version or latest (default)
3434
3535``` yaml
3636- name : Install the latest version of uv
3737 uses : astral-sh/setup-uv@v5
38- with :
39- version : " latest"
4038` ` `
4139
40+ If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
41+ in a ` uv.toml` or `pyproject.toml` file in the repository root. If none is found, the latest version will be installed.
42+
4243For an example workflow, see
4344[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
4445
46+ # ## Install the latest version
47+
48+ ` ` ` yaml
49+ - name: Install the latest version of uv
50+ uses: astral-sh/setup-uv@v5
51+ with:
52+ version: "latest"
53+ ` ` `
54+
4555# ## Install a specific version
4656
4757` ` ` yaml
@@ -70,6 +80,25 @@ to install the latest version that satisfies the range.
7080 version: "0.4.x"
7181` ` `
7282
83+ # ## Install a required-version
84+
85+ You can specify a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
86+ in either a `uv.toml` or `pyproject.toml` file :
87+
88+ ` ` ` yaml
89+ - name: Install required-version defined in uv.toml
90+ uses: astral-sh/setup-uv@v5
91+ with:
92+ uv-file: "path/to/uv.toml"
93+ ` ` `
94+
95+ ` ` ` yaml
96+ - name: Install required-version defined in pyproject.toml
97+ uses: astral-sh/setup-uv@v5
98+ with:
99+ pyproject-file: "path/to/pyproject.toml"
100+ ` ` `
101+
73102# ## Python version
74103
75104You can use the input `python-version` to
0 commit comments