mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-10-18 16:46:58 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b7bf78939d | ||
|
cb6c0a53d9 | ||
|
dffc6292f2 | ||
|
6e346e1653 | ||
|
3ccd0fd498 | ||
|
ce6dbd84e1 | ||
|
2382069a66 | ||
|
b1daf91f4e |
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
|
||||
uses: github/codeql-action/init@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
source-root: src
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
|
||||
uses: github/codeql-action/autobuild@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -73,4 +73,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
|
||||
uses: github/codeql-action/analyze@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
|
||||
|
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@@ -25,10 +25,10 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Actionlint
|
||||
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
||||
uses: eifinger/actionlint-action@03ff1f78c0670b71017616a37170f327df932030 # v1.9.2
|
||||
- name: Run zizmor
|
||||
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
|
||||
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: "24"
|
||||
- run: |
|
||||
@@ -114,6 +114,9 @@ jobs:
|
||||
- version-input: ">=0.4.25,<0.5"
|
||||
expected-version: "0.4.25"
|
||||
resolution-strategy: "lowest"
|
||||
- version-input: ">=0.4.25"
|
||||
expected-version: "0.4.25"
|
||||
resolution-strategy: "lowest"
|
||||
- version-input: ">=0.1,<0.2"
|
||||
expected-version: "0.1.45"
|
||||
resolution-strategy: "highest"
|
||||
|
2
.github/workflows/update-known-versions.yml
vendored
2
.github/workflows/update-known-versions.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: true
|
||||
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: "20"
|
||||
- name: Update known versions
|
||||
|
16
README.md
16
README.md
@@ -26,7 +26,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
```
|
||||
|
||||
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
|
||||
@@ -42,7 +42,7 @@ Have a look under [Advanced Configuration](#advanced-configuration) for detailed
|
||||
|
||||
```yaml
|
||||
- name: Install uv with all available options
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
# The version of uv to install (default: searches for version in config files, then latest)
|
||||
version: ""
|
||||
@@ -134,7 +134,7 @@ This will override any python version specifications in `pyproject.toml` and `.p
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv and set the python version to 3.13t
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: 3.13t
|
||||
- run: uv pip install --python=3.13t pip
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install the latest version of uv and set the python version
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Test with python ${{ matrix.python-version }}
|
||||
@@ -169,7 +169,7 @@ It also controls where [the venv gets created](#activate-environment).
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the config files in the working-directory
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
working-directory: my/subproject/dir
|
||||
```
|
||||
@@ -208,7 +208,7 @@ For example:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@main
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Test
|
||||
@@ -220,7 +220,7 @@ To install a specific version of Python, use
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Install Python 3.12
|
||||
@@ -239,7 +239,7 @@ output:
|
||||
uses: actions/checkout@main
|
||||
- name: Install the default version of uv
|
||||
id: setup-uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
- name: Print the installed version
|
||||
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
|
||||
```
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
|
||||
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
|
||||
"assist": {
|
||||
"actions": {
|
||||
"source": {
|
||||
|
29
dist/setup/index.js
generated
vendored
29
dist/setup/index.js
generated
vendored
@@ -125351,6 +125351,24 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KNOWN_CHECKSUMS = void 0;
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
exports.KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.9.3": "d6b2eaa1025b24b4779602763ad92f20112cbf19732fc6e0c72bb57a6a592c6c",
|
||||
"aarch64-pc-windows-msvc-0.9.3": "cf14a72d3a53e9cd63a0d87b6f2d1e92429dea9cd133d77c8ebffd57248191f1",
|
||||
"aarch64-unknown-linux-gnu-0.9.3": "2094a3ead5a026a2f6894c4d3f71026129c8878939a57f17f0c8246a737bed1d",
|
||||
"aarch64-unknown-linux-musl-0.9.3": "0544bdb24daffe91e3c14373875767e0be31e85e85e532171ab53d8c744149ac",
|
||||
"arm-unknown-linux-musleabihf-0.9.3": "d120656ddfd22cbcf751c3cf7173992ab4fccf83282868ba1e3ffb79cea4fee6",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.3": "a524b78c31a43131ad0872e56fcaeb36616f11e5323acb74b547157272723eb6",
|
||||
"armv7-unknown-linux-musleabihf-0.9.3": "acb2a76a585e27b3ded59eeba114771cc76303ea1d3e53c7b9df6b60ed44b952",
|
||||
"i686-pc-windows-msvc-0.9.3": "dd054d5a92c1b88daa757e913c85f2f1b9c8bd3b6e530916cfc4d4a612f5638f",
|
||||
"i686-unknown-linux-gnu-0.9.3": "fd16f999a437157d7a0fce41963373d994480431412b465bda9d818c4070c952",
|
||||
"i686-unknown-linux-musl-0.9.3": "c77e3cd1ac93cf04695f952bc53f79f93b5ff2f126f0d1fa6a347b7099aca0b2",
|
||||
"powerpc64-unknown-linux-gnu-0.9.3": "98eee12b4bab516bdea0be3a6c5ea0077c6f90d8d745382fc1f41256fcbacddb",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.3": "ae6e1c44e6291041dfcef21bedb5ea528992ff52ae193c5a17d4ac0bf94188e5",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.3": "369eb1efe7126228a77eab55eafb53f176025b67c9c73c53cd176a173d2d3485",
|
||||
"s390x-unknown-linux-gnu-0.9.3": "3864b46a71bc7873d712a4b38d89df47c9e654b09a535d21a4280feb325e7c7a",
|
||||
"x86_64-apple-darwin-0.9.3": "ad57ed22bf793267ea97cfc0022afa096149e894dd161ee4ae5401b7c4a6db83",
|
||||
"x86_64-pc-windows-msvc-0.9.3": "9f7595313b44e57dcaeef63fe4f3de9a0cf4f92a53302b429341f457f70ca3b9",
|
||||
"x86_64-unknown-linux-gnu-0.9.3": "4d6f84490da4b21bb6075ffc1c6b22e0cf37bc98d7cca8aff9fbb759093cdc23",
|
||||
"x86_64-unknown-linux-musl-0.9.3": "bee6515c7476baea4a491a088ad7750cf599d25f4adcd37e0f987d4192c68f24",
|
||||
"aarch64-apple-darwin-0.9.2": "90b1e69da3d04772565dd556ae8e72c86bdb7da85a8dfc2c6b50c400b0e6aa97",
|
||||
"aarch64-pc-windows-msvc-0.9.2": "b28ae90188f00c6d9e6f32fe252ace25a3698eeca1458d435ac1ca55049607ff",
|
||||
"aarch64-unknown-linux-gnu-0.9.2": "0f0ecf2abcb50f8fb5d2b52c8095af4c133897086e3f2e0259f4fcb3d8ddf273",
|
||||
@@ -129196,24 +129214,25 @@ async function resolveVersion(versionInput, manifestFile, githubToken, resolutio
|
||||
core.debug(`Resolving version: ${versionInput}`);
|
||||
let version;
|
||||
const isSimpleMinimumVersionSpecifier = versionInput.includes(">") && !versionInput.includes(",");
|
||||
if (isSimpleMinimumVersionSpecifier) {
|
||||
const resolveVersionSpecifierToLatest = isSimpleMinimumVersionSpecifier && resolutionStrategy === "highest";
|
||||
if (resolveVersionSpecifierToLatest) {
|
||||
core.info("Found minimum version specifier, using latest version");
|
||||
}
|
||||
if (manifestFile) {
|
||||
version =
|
||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
||||
versionInput === "latest" || resolveVersionSpecifierToLatest
|
||||
? await (0, version_manifest_1.getLatestKnownVersion)(manifestFile)
|
||||
: versionInput;
|
||||
}
|
||||
else {
|
||||
version =
|
||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
||||
versionInput === "latest" || resolveVersionSpecifierToLatest
|
||||
? await getLatestVersion(githubToken)
|
||||
: versionInput;
|
||||
}
|
||||
if (tc.isExplicitVersion(version)) {
|
||||
core.debug(`Version ${version} is an explicit version.`);
|
||||
if (isSimpleMinimumVersionSpecifier) {
|
||||
if (resolveVersionSpecifierToLatest) {
|
||||
if (!pep440.satisfies(version, versionInput)) {
|
||||
throw new Error(`No version found for ${versionInput}`);
|
||||
}
|
||||
@@ -129600,7 +129619,7 @@ async function run() {
|
||||
}
|
||||
}
|
||||
function detectEmptyWorkdir() {
|
||||
if (node_fs_1.default.readdirSync(".").length === 0) {
|
||||
if (node_fs_1.default.readdirSync(inputs_1.workingDirectory).length === 0) {
|
||||
if (inputs_1.ignoreEmptyWorkdir) {
|
||||
core.info("Empty workdir detected. Ignoring because ignore-empty-workdir is enabled");
|
||||
}
|
||||
|
18
dist/update-known-versions/index.js
generated
vendored
18
dist/update-known-versions/index.js
generated
vendored
@@ -61851,6 +61851,24 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KNOWN_CHECKSUMS = void 0;
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
exports.KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.9.3": "d6b2eaa1025b24b4779602763ad92f20112cbf19732fc6e0c72bb57a6a592c6c",
|
||||
"aarch64-pc-windows-msvc-0.9.3": "cf14a72d3a53e9cd63a0d87b6f2d1e92429dea9cd133d77c8ebffd57248191f1",
|
||||
"aarch64-unknown-linux-gnu-0.9.3": "2094a3ead5a026a2f6894c4d3f71026129c8878939a57f17f0c8246a737bed1d",
|
||||
"aarch64-unknown-linux-musl-0.9.3": "0544bdb24daffe91e3c14373875767e0be31e85e85e532171ab53d8c744149ac",
|
||||
"arm-unknown-linux-musleabihf-0.9.3": "d120656ddfd22cbcf751c3cf7173992ab4fccf83282868ba1e3ffb79cea4fee6",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.3": "a524b78c31a43131ad0872e56fcaeb36616f11e5323acb74b547157272723eb6",
|
||||
"armv7-unknown-linux-musleabihf-0.9.3": "acb2a76a585e27b3ded59eeba114771cc76303ea1d3e53c7b9df6b60ed44b952",
|
||||
"i686-pc-windows-msvc-0.9.3": "dd054d5a92c1b88daa757e913c85f2f1b9c8bd3b6e530916cfc4d4a612f5638f",
|
||||
"i686-unknown-linux-gnu-0.9.3": "fd16f999a437157d7a0fce41963373d994480431412b465bda9d818c4070c952",
|
||||
"i686-unknown-linux-musl-0.9.3": "c77e3cd1ac93cf04695f952bc53f79f93b5ff2f126f0d1fa6a347b7099aca0b2",
|
||||
"powerpc64-unknown-linux-gnu-0.9.3": "98eee12b4bab516bdea0be3a6c5ea0077c6f90d8d745382fc1f41256fcbacddb",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.3": "ae6e1c44e6291041dfcef21bedb5ea528992ff52ae193c5a17d4ac0bf94188e5",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.3": "369eb1efe7126228a77eab55eafb53f176025b67c9c73c53cd176a173d2d3485",
|
||||
"s390x-unknown-linux-gnu-0.9.3": "3864b46a71bc7873d712a4b38d89df47c9e654b09a535d21a4280feb325e7c7a",
|
||||
"x86_64-apple-darwin-0.9.3": "ad57ed22bf793267ea97cfc0022afa096149e894dd161ee4ae5401b7c4a6db83",
|
||||
"x86_64-pc-windows-msvc-0.9.3": "9f7595313b44e57dcaeef63fe4f3de9a0cf4f92a53302b429341f457f70ca3b9",
|
||||
"x86_64-unknown-linux-gnu-0.9.3": "4d6f84490da4b21bb6075ffc1c6b22e0cf37bc98d7cca8aff9fbb759093cdc23",
|
||||
"x86_64-unknown-linux-musl-0.9.3": "bee6515c7476baea4a491a088ad7750cf599d25f4adcd37e0f987d4192c68f24",
|
||||
"aarch64-apple-darwin-0.9.2": "90b1e69da3d04772565dd556ae8e72c86bdb7da85a8dfc2c6b50c400b0e6aa97",
|
||||
"aarch64-pc-windows-msvc-0.9.2": "b28ae90188f00c6d9e6f32fe252ace25a3698eeca1458d435ac1ca55049607ff",
|
||||
"aarch64-unknown-linux-gnu-0.9.2": "0f0ecf2abcb50f8fb5d2b52c8095af4c133897086e3f2e0259f4fcb3d8ddf273",
|
||||
|
@@ -6,7 +6,7 @@ This document covers advanced options for configuring which version of uv to ins
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "latest"
|
||||
```
|
||||
@@ -15,7 +15,7 @@ This document covers advanced options for configuring which version of uv to ins
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "0.4.4"
|
||||
```
|
||||
@@ -28,21 +28,21 @@ to install the latest version that satisfies the range.
|
||||
|
||||
```yaml
|
||||
- name: Install a semver range of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Pinning a minor version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "0.4.x"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Install a pep440-specifier-satisfying version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: ">=0.4.25,<0.5"
|
||||
```
|
||||
@@ -54,7 +54,7 @@ You can change this behavior using the `resolution-strategy` input:
|
||||
|
||||
```yaml
|
||||
- name: Install the lowest compatible version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
resolution-strategy: "lowest"
|
||||
@@ -76,7 +76,7 @@ uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the version defined in pyproject.toml
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version-file: "pyproject.toml"
|
||||
```
|
||||
|
@@ -22,7 +22,7 @@ You can optionally define a custom cache key suffix.
|
||||
```yaml
|
||||
- name: Enable caching and define a custom cache key suffix
|
||||
id: setup-uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: "optional-suffix"
|
||||
@@ -61,7 +61,7 @@ changes. If you use relative paths, they are relative to the repository root.
|
||||
|
||||
```yaml
|
||||
- name: Define a cache dependency glob
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "**/pyproject.toml"
|
||||
@@ -69,7 +69,7 @@ changes. If you use relative paths, they are relative to the repository root.
|
||||
|
||||
```yaml
|
||||
- name: Define a list of cache dependency globs
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
@@ -79,7 +79,7 @@ changes. If you use relative paths, they are relative to the repository root.
|
||||
|
||||
```yaml
|
||||
- name: Define an absolute cache dependency glob
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
|
||||
@@ -87,7 +87,7 @@ changes. If you use relative paths, they are relative to the repository root.
|
||||
|
||||
```yaml
|
||||
- name: Never invalidate the cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: ""
|
||||
@@ -100,7 +100,7 @@ By default, the cache will be restored.
|
||||
|
||||
```yaml
|
||||
- name: Don't restore an existing cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
restore-cache: false
|
||||
@@ -114,7 +114,7 @@ By default, the cache will be saved.
|
||||
|
||||
```yaml
|
||||
- name: Don't save the cache after the run
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
save-cache: false
|
||||
@@ -136,7 +136,7 @@ It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\setup-uv-cache` on
|
||||
|
||||
```yaml
|
||||
- name: Define a custom uv cache path
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
cache-local-path: "/path/to/cache"
|
||||
```
|
||||
@@ -155,7 +155,7 @@ input.
|
||||
|
||||
```yaml
|
||||
- name: Don't prune the cache before saving it
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
prune-cache: false
|
||||
@@ -169,7 +169,7 @@ If you want to cache Python installs along with your dependencies, set the `cach
|
||||
|
||||
```yaml
|
||||
- name: Cache Python installs
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
@@ -182,7 +182,7 @@ If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore nothing to cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
ignore-nothing-to-cache: true
|
||||
|
@@ -10,7 +10,7 @@ are automatically verified by this action. The sha256 hashes can be found on the
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version and validate the checksum
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "0.3.1"
|
||||
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
|
||||
@@ -44,7 +44,7 @@ This is useful if you maintain your own uv builds or want to override the defaul
|
||||
|
||||
```yaml
|
||||
- name: Use a custom manifest file
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
manifest-file: "https://example.com/my-custom-manifest.json"
|
||||
```
|
||||
@@ -64,7 +64,7 @@ You can disable this by setting the `add-problem-matchers` input to `false`.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv without problem matchers
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
add-problem-matchers: false
|
||||
```
|
||||
|
@@ -9,7 +9,7 @@ This allows directly using it in later steps:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv and activate the environment
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
activate-environment: true
|
||||
- run: uv pip install pip
|
||||
@@ -37,7 +37,7 @@ are not sufficient, you can provide a custom GitHub token with the necessary per
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom GitHub token
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
```
|
||||
@@ -55,7 +55,7 @@ input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool dir
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
tool-dir: "/path/to/tool/dir"
|
||||
```
|
||||
@@ -74,7 +74,7 @@ If you want to change this behaviour (especially on self-hosted runners) you can
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool bin dir
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
tool-bin-dir: "/path/to/tool-bin/dir"
|
||||
```
|
||||
@@ -91,7 +91,7 @@ This action supports expanding the `~` character to the user's home directory fo
|
||||
|
||||
```yaml
|
||||
- name: Expand the tilde character
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
cache-local-path: "~/path/to/cache"
|
||||
tool-dir: "~/path/to/tool/dir"
|
||||
@@ -108,7 +108,7 @@ If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore empty workdir
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
ignore-empty-workdir: true
|
||||
```
|
||||
@@ -131,7 +131,7 @@ This action sets several environment variables that influence uv's behavior and
|
||||
|
||||
```yaml
|
||||
- name: Example using environment variables
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: "3.12"
|
||||
tool-dir: "/custom/tool/dir"
|
||||
|
12
package-lock.json
generated
12
package-lock.json
generated
@@ -424,6 +424,7 @@
|
||||
"integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
@@ -1615,6 +1616,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.5.tgz",
|
||||
"integrity": "sha512-t54CUOsFMappY1Jbzb7fetWeO0n6K0k/4+/ZpkS+3Joz8I4VcvY9OiEBFRYISqaI2fq5sCiPtAjRDOzVYG8m+Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/auth-token": "^6.0.0",
|
||||
"@octokit/graphql": "^9.0.2",
|
||||
@@ -2512,6 +2514,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001733",
|
||||
"electron-to-chromium": "^1.5.199",
|
||||
@@ -3639,6 +3642,7 @@
|
||||
"integrity": "sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@jest/core": "30.2.0",
|
||||
"@jest/types": "30.2.0",
|
||||
@@ -5336,6 +5340,7 @@
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -6085,6 +6090,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz",
|
||||
"integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
@@ -6908,6 +6914,7 @@
|
||||
"version": "7.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.5.tgz",
|
||||
"integrity": "sha512-t54CUOsFMappY1Jbzb7fetWeO0n6K0k/4+/ZpkS+3Joz8I4VcvY9OiEBFRYISqaI2fq5sCiPtAjRDOzVYG8m+Q==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@octokit/auth-token": "^6.0.0",
|
||||
"@octokit/graphql": "^9.0.2",
|
||||
@@ -7514,6 +7521,7 @@
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz",
|
||||
"integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"caniuse-lite": "^1.0.30001733",
|
||||
"electron-to-chromium": "^1.5.199",
|
||||
@@ -8260,6 +8268,7 @@
|
||||
"resolved": "https://registry.npmjs.org/jest/-/jest-30.2.0.tgz",
|
||||
"integrity": "sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@jest/core": "30.2.0",
|
||||
"@jest/types": "30.2.0",
|
||||
@@ -9407,7 +9416,8 @@
|
||||
"version": "5.9.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.19.3",
|
||||
|
@@ -1,5 +1,41 @@
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||
"aarch64-apple-darwin-0.9.3":
|
||||
"d6b2eaa1025b24b4779602763ad92f20112cbf19732fc6e0c72bb57a6a592c6c",
|
||||
"aarch64-pc-windows-msvc-0.9.3":
|
||||
"cf14a72d3a53e9cd63a0d87b6f2d1e92429dea9cd133d77c8ebffd57248191f1",
|
||||
"aarch64-unknown-linux-gnu-0.9.3":
|
||||
"2094a3ead5a026a2f6894c4d3f71026129c8878939a57f17f0c8246a737bed1d",
|
||||
"aarch64-unknown-linux-musl-0.9.3":
|
||||
"0544bdb24daffe91e3c14373875767e0be31e85e85e532171ab53d8c744149ac",
|
||||
"arm-unknown-linux-musleabihf-0.9.3":
|
||||
"d120656ddfd22cbcf751c3cf7173992ab4fccf83282868ba1e3ffb79cea4fee6",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.3":
|
||||
"a524b78c31a43131ad0872e56fcaeb36616f11e5323acb74b547157272723eb6",
|
||||
"armv7-unknown-linux-musleabihf-0.9.3":
|
||||
"acb2a76a585e27b3ded59eeba114771cc76303ea1d3e53c7b9df6b60ed44b952",
|
||||
"i686-pc-windows-msvc-0.9.3":
|
||||
"dd054d5a92c1b88daa757e913c85f2f1b9c8bd3b6e530916cfc4d4a612f5638f",
|
||||
"i686-unknown-linux-gnu-0.9.3":
|
||||
"fd16f999a437157d7a0fce41963373d994480431412b465bda9d818c4070c952",
|
||||
"i686-unknown-linux-musl-0.9.3":
|
||||
"c77e3cd1ac93cf04695f952bc53f79f93b5ff2f126f0d1fa6a347b7099aca0b2",
|
||||
"powerpc64-unknown-linux-gnu-0.9.3":
|
||||
"98eee12b4bab516bdea0be3a6c5ea0077c6f90d8d745382fc1f41256fcbacddb",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.3":
|
||||
"ae6e1c44e6291041dfcef21bedb5ea528992ff52ae193c5a17d4ac0bf94188e5",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.3":
|
||||
"369eb1efe7126228a77eab55eafb53f176025b67c9c73c53cd176a173d2d3485",
|
||||
"s390x-unknown-linux-gnu-0.9.3":
|
||||
"3864b46a71bc7873d712a4b38d89df47c9e654b09a535d21a4280feb325e7c7a",
|
||||
"x86_64-apple-darwin-0.9.3":
|
||||
"ad57ed22bf793267ea97cfc0022afa096149e894dd161ee4ae5401b7c4a6db83",
|
||||
"x86_64-pc-windows-msvc-0.9.3":
|
||||
"9f7595313b44e57dcaeef63fe4f3de9a0cf4f92a53302b429341f457f70ca3b9",
|
||||
"x86_64-unknown-linux-gnu-0.9.3":
|
||||
"4d6f84490da4b21bb6075ffc1c6b22e0cf37bc98d7cca8aff9fbb759093cdc23",
|
||||
"x86_64-unknown-linux-musl-0.9.3":
|
||||
"bee6515c7476baea4a491a088ad7750cf599d25f4adcd37e0f987d4192c68f24",
|
||||
"aarch64-apple-darwin-0.9.2":
|
||||
"90b1e69da3d04772565dd556ae8e72c86bdb7da85a8dfc2c6b50c400b0e6aa97",
|
||||
"aarch64-pc-windows-msvc-0.9.2":
|
||||
|
@@ -141,23 +141,25 @@ export async function resolveVersion(
|
||||
let version: string;
|
||||
const isSimpleMinimumVersionSpecifier =
|
||||
versionInput.includes(">") && !versionInput.includes(",");
|
||||
if (isSimpleMinimumVersionSpecifier) {
|
||||
const resolveVersionSpecifierToLatest =
|
||||
isSimpleMinimumVersionSpecifier && resolutionStrategy === "highest";
|
||||
if (resolveVersionSpecifierToLatest) {
|
||||
core.info("Found minimum version specifier, using latest version");
|
||||
}
|
||||
if (manifestFile) {
|
||||
version =
|
||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
||||
versionInput === "latest" || resolveVersionSpecifierToLatest
|
||||
? await getLatestVersionInManifest(manifestFile)
|
||||
: versionInput;
|
||||
} else {
|
||||
version =
|
||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
||||
versionInput === "latest" || resolveVersionSpecifierToLatest
|
||||
? await getLatestVersion(githubToken)
|
||||
: versionInput;
|
||||
}
|
||||
if (tc.isExplicitVersion(version)) {
|
||||
core.debug(`Version ${version} is an explicit version.`);
|
||||
if (isSimpleMinimumVersionSpecifier) {
|
||||
if (resolveVersionSpecifierToLatest) {
|
||||
if (!pep440.satisfies(version, versionInput)) {
|
||||
throw new Error(`No version found for ${versionInput}`);
|
||||
}
|
||||
|
@@ -73,7 +73,7 @@ async function run(): Promise<void> {
|
||||
}
|
||||
|
||||
function detectEmptyWorkdir(): void {
|
||||
if (fs.readdirSync(".").length === 0) {
|
||||
if (fs.readdirSync(workingDirectory).length === 0) {
|
||||
if (ignoreEmptyWorkdir) {
|
||||
core.info(
|
||||
"Empty workdir detected. Ignoring because ignore-empty-workdir is enabled",
|
||||
|
@@ -1,4 +1,130 @@
|
||||
[
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-aarch64-apple-darwin.tar.gz",
|
||||
"platform": "apple-darwin",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-pc-windows-msvc.zip",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-aarch64-pc-windows-msvc.zip",
|
||||
"platform": "pc-windows-msvc",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-aarch64-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-unknown-linux-musl.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-aarch64-unknown-linux-musl.tar.gz",
|
||||
"platform": "unknown-linux-musl",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "arm",
|
||||
"artifactName": "uv-arm-unknown-linux-musleabihf.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-arm-unknown-linux-musleabihf.tar.gz",
|
||||
"platform": "unknown-linux-musleabihf",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "armv7",
|
||||
"artifactName": "uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
||||
"platform": "unknown-linux-gnueabihf",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "armv7",
|
||||
"artifactName": "uv-armv7-unknown-linux-musleabihf.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-armv7-unknown-linux-musleabihf.tar.gz",
|
||||
"platform": "unknown-linux-musleabihf",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "i686",
|
||||
"artifactName": "uv-i686-pc-windows-msvc.zip",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-i686-pc-windows-msvc.zip",
|
||||
"platform": "pc-windows-msvc",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "i686",
|
||||
"artifactName": "uv-i686-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-i686-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "i686",
|
||||
"artifactName": "uv-i686-unknown-linux-musl.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-i686-unknown-linux-musl.tar.gz",
|
||||
"platform": "unknown-linux-musl",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "powerpc64",
|
||||
"artifactName": "uv-powerpc64-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-powerpc64-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "powerpc64le",
|
||||
"artifactName": "uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "riscv64gc",
|
||||
"artifactName": "uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "s390x",
|
||||
"artifactName": "uv-s390x-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-s390x-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-apple-darwin.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-x86_64-apple-darwin.tar.gz",
|
||||
"platform": "apple-darwin",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-pc-windows-msvc.zip",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-x86_64-pc-windows-msvc.zip",
|
||||
"platform": "pc-windows-msvc",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-unknown-linux-musl.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.3/uv-x86_64-unknown-linux-musl.tar.gz",
|
||||
"platform": "unknown-linux-musl",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
||||
|
Reference in New Issue
Block a user