Add documentation for new inputs uv-file and pyproject-file (#235)
Some checks failed
test-cache-windows / test-setup-cache (push) Waiting to run
test-cache-windows / test-restore-cache (push) Blocked by required conditions
test-cache / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Waiting to run
test-cache / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Waiting to run
test-cache / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Waiting to run
test-cache / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Blocked by required conditions
test-cache / test-restore-cache (auto, ubuntu-latest) (push) Blocked by required conditions
test-cache / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Blocked by required conditions
test-cache / test-restore-cache (false, ubuntu-latest) (push) Blocked by required conditions
test-cache / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Blocked by required conditions
test-cache / test-restore-cache (true, ubuntu-latest) (push) Blocked by required conditions
test-cache / test-restore-cache-requirements-txt (push) Blocked by required conditions
test-cache / test-setup-cache-local (push) Waiting to run
test-cache / test-restore-cache-local (push) Blocked by required conditions
test-cache / test-tilde-expansion-cache-local-path (push) Waiting to run
test-cache / test-tilde-expansion-cache-dependency-glob (push) Waiting to run
test-cache / cleanup-tilde-expansion-tests (push) Blocked by required conditions
test-windows / test-default-version (push) Waiting to run
test / test-default-version (macos-14) (push) Waiting to run
test / test-default-version (macos-latest) (push) Waiting to run
test / test-checksum (a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218, macos-latest) (push) Waiting to run
test / test-tool-install (macos-14) (push) Waiting to run
test / test-tool-install (macos-latest) (push) Waiting to run
test / test-tool-install (windows-latest) (push) Waiting to run
test / test-tilde-expansion-tool-dirs (push) Waiting to run
Check dist/ / check-dist (push) Successful in 25s
CodeQL / Analyze (push) Failing after 0s
Release Drafter / ✏️ Draft release (push) Failing after 0s
test-cache / test-setup-cache (auto, ubuntu-latest) (push) Failing after 2s
test-cache / test-setup-cache (false, ubuntu-latest) (push) Failing after 2s
test-cache / test-setup-cache (true, ubuntu-latest) (push) Failing after 2s
test-cache / test-setup-cache-requirements-txt (push) Failing after 2s
test-cache / test-setup-cache-dependency-glob (push) Failing after 2s
test-cache / test-restore-cache-dependency-glob (push) Has been skipped
test-cache / test-no-python-version (push) Failing after 1s
test / build (push) Successful in 27s
test / test-default-version (ubuntu-latest) (push) Failing after 2s
test / test-specific-version (0.3) (push) Failing after 2s
test / test-specific-version (0.3.0) (push) Successful in 2s
test / test-specific-version (0.3.2) (push) Successful in 2s
test / test-specific-version (0.3.x) (push) Failing after 2s
test / test-specific-version (>=0.3.0) (push) Failing after 1s
test / test-semver-range (push) Failing after 1s
test / test-pyproject-file-version (push) Successful in 3s
test / test-uv-file-version (push) Successful in 3s
test / test-checksum (4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd, ubuntu-latest) (push) Successful in 3s
test / test-with-explicit-token (push) Failing after 2s
test / test-uvx (push) Failing after 2s
test / test-tool-install (ubuntu-latest) (push) Failing after 2s
test / test-python-version (macos-latest) (push) Failing after 2s
test / test-python-version (ubuntu-latest) (push) Failing after 2s
test / test-python-version (windows-latest) (push) Failing after 2s

This commit is contained in:
Kevin Stillhammer 2025-01-13 15:32:41 +01:00 committed by GitHub
parent 5ce9ee0011
commit 9fffe05b88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,20 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
## Usage ## Usage
### Install the latest version (default) ### Install a required-version or latest (default)
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
```
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
in a `uv.toml` or `pyproject.toml` file in the repository root. If none is found, the latest version will be installed.
For an example workflow, see
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
### Install the latest version
```yaml ```yaml
- name: Install the latest version of uv - name: Install the latest version of uv
@ -39,9 +52,6 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
version: "latest" version: "latest"
``` ```
For an example workflow, see
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
### Install a specific version ### Install a specific version
```yaml ```yaml
@ -70,6 +80,25 @@ to install the latest version that satisfies the range.
version: "0.4.x" version: "0.4.x"
``` ```
### Install a required-version
You can specify a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
in either a `uv.toml` or `pyproject.toml` file:
```yaml
- name: Install required-version defined in uv.toml
uses: astral-sh/setup-uv@v5
with:
uv-file: "path/to/uv.toml"
```
```yaml
- name: Install required-version defined in pyproject.toml
uses: astral-sh/setup-uv@v5
with:
pyproject-file: "path/to/pyproject.toml"
```
### Python version ### Python version
You can use the input `python-version` to You can use the input `python-version` to