mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-12-15 11:07:14 +00:00
Compare commits
14 Commits
copilot/ad
...
fix-custom
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8929258af7 | ||
|
|
2ddd2b9cb3 | ||
|
|
b7bf78939d | ||
|
|
cb6c0a53d9 | ||
|
|
dffc6292f2 | ||
|
|
6e346e1653 | ||
|
|
3ccd0fd498 | ||
|
|
ce6dbd84e1 | ||
|
|
2382069a66 | ||
|
|
b1daf91f4e | ||
|
|
3259c6206f | ||
|
|
bf8e8ed895 | ||
|
|
9c6b5e9fb5 | ||
|
|
a5129e99f4 |
263
.github/copilot-instructions.md
vendored
Normal file
263
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
# Copilot Instructions for setup-uv
|
||||
|
||||
This document provides essential information for GitHub Copilot coding agents working on the `astral-sh/setup-uv` repository.
|
||||
|
||||
## Repository Overview
|
||||
|
||||
**setup-uv** is a GitHub Action that sets up the [uv](https://docs.astral.sh/uv/)
|
||||
Python package installer in GitHub Actions workflows.
|
||||
It's a TypeScript-based action that downloads uv binaries, manages caching, handles version resolution,
|
||||
and configures the environment for subsequent workflow steps.
|
||||
|
||||
### Key Features
|
||||
|
||||
- Downloads and installs specific uv versions from GitHub releases
|
||||
- Supports version resolution from config files (pyproject.toml, uv.toml, .tool-versions)
|
||||
- Implements intelligent caching for both uv cache and Python installations
|
||||
- Provides cross-platform support (Linux, macOS, Windows, including ARM architectures)
|
||||
- Includes problem matchers for Python error reporting
|
||||
- Supports environment activation and custom tool directories
|
||||
|
||||
## Repository Structure
|
||||
|
||||
**Size**: Small-medium repository (~50 source files, ~400 total files including dependencies)
|
||||
**Languages**: TypeScript (primary), JavaScript (compiled output), JSON (configuration)
|
||||
**Runtime**: Node.js 24 (GitHub Actions runtime)
|
||||
**Key Dependencies**: @actions/core, @actions/cache, @actions/tool-cache, @octokit/core
|
||||
|
||||
### Core Architecture
|
||||
|
||||
```
|
||||
src/
|
||||
├── setup-uv.ts # Main entry point and orchestration
|
||||
├── save-cache.ts # Post-action cache saving logic
|
||||
├── update-known-versions.ts # Maintenance script for version updates
|
||||
├── cache/ # Cache management functionality
|
||||
├── download/ # Version resolution and binary downloading
|
||||
├── utils/ # Input parsing, platform detection, configuration
|
||||
└── version/ # Version resolution from various file formats
|
||||
```
|
||||
|
||||
### Key Files and Locations
|
||||
|
||||
- **Action Definition**: `action.yml` - Defines all inputs/outputs and entry points
|
||||
- **Main Source**: `src/setup-uv.ts` - Primary action logic
|
||||
- **Configuration**: `biome.json` (linting), `tsconfig.json` (TypeScript), `jest.config.js` (testing)
|
||||
- **Compiled Output**: `dist/` - Contains compiled Node.js bundles (auto-generated, committed)
|
||||
- **Test Fixtures**: `__tests__/fixtures/` - Sample projects for different configuration scenarios
|
||||
- **Workflows**: `.github/workflows/test.yml` - Comprehensive CI/CD pipeline
|
||||
|
||||
## Build and Development Process
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Node.js 24+ (matches GitHub Actions runtime)
|
||||
- npm (included with Node.js)
|
||||
|
||||
### Essential Commands (ALWAYS run in this order)
|
||||
|
||||
#### 1. Install Dependencies
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
**Timing**: ~20-30 seconds
|
||||
**Note**: Always run this first after cloning or when package.json changes
|
||||
|
||||
#### 2. Build TypeScript
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
**Timing**: ~5-10 seconds
|
||||
**Purpose**: Compiles TypeScript source to JavaScript in `lib/` directory
|
||||
|
||||
#### 3. Lint and Format Code
|
||||
|
||||
```bash
|
||||
npm run check
|
||||
```
|
||||
|
||||
**Timing**: ~2-5 seconds
|
||||
**Tool**: Biome (replaces ESLint/Prettier)
|
||||
**Auto-fixes**: Formatting, import organization, basic linting issues
|
||||
|
||||
#### 4. Package for Distribution
|
||||
|
||||
```bash
|
||||
npm run package
|
||||
```
|
||||
|
||||
**Timing**: ~20-30 seconds
|
||||
**Purpose**: Creates bundled distributions in `dist/` using @vercel/ncc
|
||||
**Critical**: This step MUST be run before committing - the `dist/` files are used by GitHub Actions
|
||||
|
||||
#### 5. Run Tests
|
||||
|
||||
```bash
|
||||
npm test
|
||||
```
|
||||
|
||||
**Timing**: ~10-15 seconds
|
||||
**Framework**: Jest with TypeScript support
|
||||
**Coverage**: Unit tests for version resolution, input parsing, checksum validation
|
||||
|
||||
#### 6. Complete Validation (Recommended)
|
||||
|
||||
```bash
|
||||
npm run all
|
||||
```
|
||||
|
||||
**Timing**: ~60-90 seconds
|
||||
**Purpose**: Runs build → check → package → test in sequence
|
||||
**Use**: Before making pull requests or when unsure about build state
|
||||
|
||||
### Important Build Notes
|
||||
|
||||
**CRITICAL**: Always run `npm run package` after making code changes. The `dist/` directory contains the compiled bundles that GitHub Actions actually executes. Forgetting this step will cause your changes to have no effect.
|
||||
|
||||
**TypeScript Warnings**: You may see ts-jest warnings about "isolatedModules" - these are harmless and don't affect functionality.
|
||||
|
||||
**Biome**: This project uses Biome instead of ESLint/Prettier. Run `npm run check` to fix formatting and linting issues automatically.
|
||||
|
||||
## Testing Strategy
|
||||
|
||||
### Unit Tests
|
||||
|
||||
- **Location**: `__tests__/` directory
|
||||
- **Framework**: Jest with ts-jest transformer
|
||||
- **Coverage**: Version resolution, input parsing, checksum validation, utility functions
|
||||
|
||||
### Integration Tests
|
||||
|
||||
- **Location**: `.github/workflows/test.yml`
|
||||
- **Scope**: Full end-to-end testing across multiple platforms and scenarios
|
||||
- **Key Test Categories**:
|
||||
- Version installation (specific, latest, semver ranges)
|
||||
- Cache behavior (setup, restore, invalidation)
|
||||
- Cross-platform compatibility (Ubuntu, macOS, Windows, ARM)
|
||||
- Configuration file parsing (pyproject.toml, uv.toml, requirements.txt)
|
||||
- Error handling and edge cases
|
||||
|
||||
### Test Fixtures
|
||||
|
||||
Located in `__tests__/fixtures/`, these provide sample projects with different configurations:
|
||||
- `pyproject-toml-project/` - Standard Python project with uv version specification
|
||||
- `uv-toml-project/` - Project using uv.toml configuration
|
||||
- `requirements-txt-project/` - Legacy requirements.txt format
|
||||
- `cache-dir-defined-project/` - Custom cache directory configuration
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
### GitHub Workflows
|
||||
|
||||
#### Primary Test Suite (`.github/workflows/test.yml`)
|
||||
|
||||
- **Triggers**: PRs, pushes to main, manual dispatch
|
||||
- **Matrix**: Multiple OS (Ubuntu, macOS, Windows), architecture (x64, ARM), and configuration combinations
|
||||
- **Duration**: ~5 minutes for full matrix
|
||||
- **Key Validations**:
|
||||
- Cross-platform installation and functionality
|
||||
- Cache behavior and performance
|
||||
- Version resolution from various sources
|
||||
- Tool directory configurations
|
||||
- Problem matcher functionality
|
||||
|
||||
#### Maintenance Workflows
|
||||
|
||||
- **CodeQL Analysis**: Security scanning on pushes/PRs
|
||||
- **Update Known Versions**: Daily job to sync with latest uv releases
|
||||
- **Dependabot**: Automated dependency updates
|
||||
|
||||
### Pre-commit Validation
|
||||
|
||||
The CI runs these checks that you should run locally:
|
||||
1. `npm run all` - Complete build and test suite
|
||||
2. ActionLint - GitHub Actions workflow validation
|
||||
3. Change detection - Ensures no uncommitted build artifacts
|
||||
|
||||
## Key Configuration Files
|
||||
|
||||
### Action Configuration (`action.yml`)
|
||||
|
||||
Defines 20+ inputs including version specifications,
|
||||
cache settings, tool directories, and environment options.
|
||||
This file is the authoritative source for understanding available action parameters.
|
||||
|
||||
### TypeScript Configuration (`tsconfig.json`)
|
||||
|
||||
- Target: ES2024
|
||||
- Module: nodenext (Node.js modules)
|
||||
- Strict mode enabled
|
||||
- Output directory: `lib/`
|
||||
|
||||
### Linting Configuration (`biome.json`)
|
||||
|
||||
- Formatter and linter combined
|
||||
- Enforces consistent code style
|
||||
- Automatically organizes imports and sorts object keys
|
||||
|
||||
## Common Development Patterns
|
||||
|
||||
### Making Code Changes
|
||||
|
||||
1. Edit TypeScript source files in `src/`
|
||||
2. Run `npm run build` to compile
|
||||
3. Run `npm run check` to format and lint
|
||||
4. Run `npm run package` to update distribution bundles
|
||||
5. Run `npm test` to verify functionality
|
||||
6. Commit all changes including `dist/` files
|
||||
|
||||
### Adding New Features
|
||||
|
||||
- Follow existing patterns in `src/utils/inputs.ts` for new action inputs
|
||||
- Update `action.yml` to declare new inputs/outputs
|
||||
- Add corresponding tests in `__tests__/`
|
||||
- Add a test in `.github/workflows/test.yml` if it affects integration
|
||||
- Update README.md with usage examples
|
||||
|
||||
### Cache-Related Changes
|
||||
|
||||
- Cache logic is complex and affects performance significantly
|
||||
- Test with multiple cache scenarios (hit, miss, invalidation)
|
||||
- Consider impact on both GitHub-hosted and self-hosted runners
|
||||
- Validate cache key generation and dependency detection
|
||||
|
||||
### Version Resolution Changes
|
||||
|
||||
- Version resolution supports multiple file formats and precedence rules
|
||||
- Test with fixtures in `__tests__/fixtures/`
|
||||
- Consider backward compatibility with existing projects
|
||||
- Validate semver and PEP 440 specification handling
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Build Failures
|
||||
|
||||
- **"Module not found"**: Run `npm install` to ensure dependencies are installed
|
||||
- **TypeScript errors**: Check `tsconfig.json` and ensure all imports are valid
|
||||
- **Test failures**: Check if test fixtures have been modified or if logic changes broke assumptions
|
||||
|
||||
### Action Failures in Workflows
|
||||
|
||||
- **Changes not taking effect**: Ensure `npm run package` was run and `dist/` files committed
|
||||
- **Version resolution issues**: Check version specification format and file existence
|
||||
- **Cache problems**: Verify cache key generation and dependency glob patterns
|
||||
|
||||
### Common Gotchas
|
||||
|
||||
- **Forgetting to package**: Code changes won't work without running `npm run package`
|
||||
- **Platform differences**: Windows paths use backslashes, test cross-platform behavior
|
||||
- **Cache invalidation**: Cache keys are sensitive to dependency file changes
|
||||
- **Tool directory permissions**: Some platforms require specific directory setups
|
||||
|
||||
## Trust These Instructions
|
||||
|
||||
These instructions are comprehensive and current. Only search for additional information if:
|
||||
- You encounter specific error messages not covered here
|
||||
- You need to understand implementation details of specific functions
|
||||
- The instructions appear outdated (check repository commit history)
|
||||
|
||||
For most development tasks, following the build process and development patterns outlined above will be sufficient.
|
||||
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
|
||||
|
||||
21
.github/workflows/test.yml
vendored
21
.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: |
|
||||
@@ -111,15 +111,28 @@ jobs:
|
||||
expected-version: "0.3.5"
|
||||
- version-input: ">=0.4.25,<0.5"
|
||||
expected-version: "0.4.30"
|
||||
- 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"
|
||||
- version-input: ">=0.1.0,<0.2"
|
||||
expected-version: "0.1.0"
|
||||
resolution-strategy: "lowest"
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version ${{ matrix.input.version-input }}
|
||||
- name: Install version ${{ matrix.input.version-input }} with strategy ${{ matrix.input.resolution-strategy || 'highest' }}
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
version: ${{ matrix.input.version-input }}
|
||||
resolution-strategy: ${{ matrix.input.resolution-strategy || 'highest' }}
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
|
||||
@@ -748,7 +761,7 @@ jobs:
|
||||
- name: Install from custom manifest file
|
||||
uses: ./
|
||||
with:
|
||||
manifest-file: "https://raw.githubusercontent.com/astral-sh/setup-uv/${{ github.ref }}/__tests__/download/custom-manifest.json"
|
||||
manifest-file: "https://raw.githubusercontent.com/astral-sh/setup-uv/main/__tests__/download/custom-manifest.json"
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
- name: Correct version gets installed
|
||||
|
||||
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
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -100,3 +100,6 @@ lib/**/*
|
||||
|
||||
# Idea IDEs (PyCharm, WebStorm, IntelliJ, etc)
|
||||
.idea/
|
||||
|
||||
# Compiled scripts
|
||||
.github/scripts/*.js
|
||||
|
||||
560
README.md
560
README.md
@@ -12,28 +12,11 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
||||
|
||||
- [Usage](#usage)
|
||||
- [Install a required-version or latest (default)](#install-a-required-version-or-latest-default)
|
||||
- [Install the latest version](#install-the-latest-version)
|
||||
- [Install a specific version](#install-a-specific-version)
|
||||
- [Install a version by supplying a semver range or pep440 specifier](#install-a-version-by-supplying-a-semver-range-or-pep440-specifier)
|
||||
- [Install a version defined in a requirements or config file](#install-a-version-defined-in-a-requirements-or-config-file)
|
||||
- [Inputs](#inputs)
|
||||
- [Outputs](#outputs)
|
||||
- [Python version](#python-version)
|
||||
- [Activate environment](#activate-environment)
|
||||
- [Working directory](#working-directory)
|
||||
- [Validate checksum](#validate-checksum)
|
||||
- [Enable Caching](#enable-caching)
|
||||
- [Cache dependency glob](#cache-dependency-glob)
|
||||
- [Restore cache](#restore-cache)
|
||||
- [Save cache](#save-cache)
|
||||
- [Local cache path](#local-cache-path)
|
||||
- [Disable cache pruning](#disable-cache-pruning)
|
||||
- [Cache Python installs](#cache-python-installs)
|
||||
- [Ignore nothing to cache](#ignore-nothing-to-cache)
|
||||
- [GitHub authentication token](#github-authentication-token)
|
||||
- [UV_TOOL_DIR](#uv_tool_dir)
|
||||
- [UV_TOOL_BIN_DIR](#uv_tool_bin_dir)
|
||||
- [Tilde Expansion](#tilde-expansion)
|
||||
- [Manifest file](#manifest-file)
|
||||
- [Add problem matchers](#add-problem-matchers)
|
||||
- [Advanced Configuration](#advanced-configuration)
|
||||
- [How it works](#how-it-works)
|
||||
- [FAQ](#faq)
|
||||
|
||||
@@ -43,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)
|
||||
@@ -52,65 +35,96 @@ in a `uv.toml` or `pyproject.toml` file in the repository root. If none is found
|
||||
For an example workflow, see
|
||||
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
|
||||
|
||||
### Install the latest version
|
||||
### Inputs
|
||||
|
||||
All inputs and their defaults.
|
||||
Have a look under [Advanced Configuration](#advanced-configuration) for detailed documentation on most of them.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
- name: Install uv with all available options
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "latest"
|
||||
# The version of uv to install (default: searches for version in config files, then latest)
|
||||
version: ""
|
||||
|
||||
# Path to a file containing the version of uv to install (default: searches uv.toml then pyproject.toml)
|
||||
version-file: ""
|
||||
|
||||
# Resolution strategy when resolving version ranges: 'highest' or 'lowest'
|
||||
resolution-strategy: "highest"
|
||||
|
||||
# The version of Python to set UV_PYTHON to
|
||||
python-version: ""
|
||||
|
||||
# Use uv venv to activate a venv ready to be used by later steps
|
||||
activate-environment: "false"
|
||||
|
||||
# The directory to execute all commands in and look for files such as pyproject.toml
|
||||
working-directory: ""
|
||||
|
||||
# The checksum of the uv version to install
|
||||
checksum: ""
|
||||
|
||||
# Used to increase the rate limit when retrieving versions and downloading uv
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
# Enable uploading of the uv cache: true, false, or auto (enabled on GitHub-hosted runners, disabled on self-hosted runners)
|
||||
enable-cache: "auto"
|
||||
|
||||
# Glob pattern to match files relative to the repository root to control the cache
|
||||
cache-dependency-glob: |
|
||||
**/*requirements*.txt
|
||||
**/*requirements*.in
|
||||
**/*constraints*.txt
|
||||
**/*constraints*.in
|
||||
**/pyproject.toml
|
||||
**/uv.lock
|
||||
**/*.py.lock
|
||||
|
||||
# Whether to restore the cache if found
|
||||
restore-cache: "true"
|
||||
|
||||
# Whether to save the cache after the run
|
||||
save-cache: "true"
|
||||
|
||||
# Suffix for the cache key
|
||||
cache-suffix: ""
|
||||
|
||||
# Local path to store the cache (default: "" - uses system temp directory)
|
||||
cache-local-path: ""
|
||||
|
||||
# Prune cache before saving
|
||||
prune-cache: "true"
|
||||
|
||||
# Upload managed Python installations to the GitHub Actions cache
|
||||
cache-python: "false"
|
||||
|
||||
# Ignore when nothing is found to cache
|
||||
ignore-nothing-to-cache: "false"
|
||||
|
||||
# Ignore when the working directory is empty
|
||||
ignore-empty-workdir: "false"
|
||||
|
||||
# Custom path to set UV_TOOL_DIR to
|
||||
tool-dir: ""
|
||||
|
||||
# Custom path to set UV_TOOL_BIN_DIR to
|
||||
tool-bin-dir: ""
|
||||
|
||||
# URL to the manifest file containing available versions and download URLs
|
||||
manifest-file: ""
|
||||
|
||||
# Add problem matchers
|
||||
add-problem-matchers: "true"
|
||||
```
|
||||
|
||||
### Install a specific version
|
||||
### Outputs
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "0.4.4"
|
||||
```
|
||||
|
||||
### Install a version by supplying a semver range or pep440 specifier
|
||||
|
||||
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
|
||||
or [pep440 specifier](https://peps.python.org/pep-0440/#version-specifiers)
|
||||
to install the latest version that satisfies the range.
|
||||
|
||||
```yaml
|
||||
- name: Install a semver range of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Pinning a minor version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "0.4.x"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Install a pep440-specifier-satisfying version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: ">=0.4.25,<0.5"
|
||||
```
|
||||
|
||||
### Install a version defined in a requirements or config file
|
||||
|
||||
You can use the `version-file` input to specify a file that contains the version of uv to install.
|
||||
This can either be a `pyproject.toml` or `uv.toml` file which defines a `required-version` or
|
||||
uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
|
||||
|
||||
[asdf](https://asdf-vm.com/) `.tool-versions` is also supported, but without the `ref` syntax.
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the version defined in pyproject.toml
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version-file: "pyproject.toml"
|
||||
```
|
||||
- `uv-version`: The installed uv version. Useful when using latest.
|
||||
- `uv-path`: The path to the installed uv binary.
|
||||
- `uvx-path`: The path to the installed uvx binary.
|
||||
- `cache-hit`: A boolean value to indicate a cache entry was found.
|
||||
- `venv`: Path to the activated venv if activate-environment is true.
|
||||
|
||||
### Python version
|
||||
|
||||
@@ -120,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
|
||||
@@ -138,36 +152,13 @@ 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 }}
|
||||
run: uv run --frozen pytest
|
||||
```
|
||||
|
||||
### Activate environment
|
||||
|
||||
You can set `activate-environment` to `true` to automatically activate a venv.
|
||||
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
|
||||
with:
|
||||
activate-environment: true
|
||||
- run: uv pip install pip
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> Activating the environment adds your dependencies to the `PATH`, which could break some workflows.
|
||||
> For example, if you have a dependency which requires uv, e.g., `hatch`, activating the
|
||||
> environment will shadow the `uv` binary installed by this action and may result in a different uv
|
||||
> version being used.
|
||||
>
|
||||
> We do not recommend using this setting for most use-cases. Instead, use `uv run` to execute
|
||||
> commands in the environment.
|
||||
|
||||
### Working directory
|
||||
|
||||
You can set the working directory with the `working-directory` input.
|
||||
@@ -178,351 +169,19 @@ 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
|
||||
```
|
||||
|
||||
### Validate checksum
|
||||
## Advanced Configuration
|
||||
|
||||
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
|
||||
are automatically verified by this action. The sha256 hashes can be found on the
|
||||
[releases page](https://github.com/astral-sh/uv/releases) of the uv repo.
|
||||
For more advanced configuration options, see our detailed documentation:
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version and validate the checksum
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "0.3.1"
|
||||
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
|
||||
```
|
||||
|
||||
### Enable caching
|
||||
|
||||
> [!NOTE]
|
||||
> The cache is pruned before it is uploaded to the GitHub Actions cache. This can lead to
|
||||
> a small or empty cache. See [Disable cache pruning](#disable-cache-pruning) for more details.
|
||||
|
||||
If you enable caching, the [uv cache](https://docs.astral.sh/uv/concepts/cache/) will be uploaded to
|
||||
the GitHub Actions cache. This can speed up runs that reuse the cache by several minutes.
|
||||
Caching is enabled by default on GitHub-hosted runners.
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> On self-hosted runners this is usually not needed since the cache generated by uv on the runner's
|
||||
> filesystem is not removed after a run. For more details see [Local cache path](#local-cache-path).
|
||||
|
||||
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
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: "optional-suffix"
|
||||
```
|
||||
|
||||
When the cache was successfully restored, the output `cache-hit` will be set to `true` and you can
|
||||
use it in subsequent steps. For example, to use the cache in the above case:
|
||||
|
||||
```yaml
|
||||
- name: Do something if the cache was restored
|
||||
if: steps.setup-uv.outputs.cache-hit == 'true'
|
||||
run: echo "Cache was restored"
|
||||
```
|
||||
|
||||
#### Cache dependency glob
|
||||
|
||||
If you want to control when the GitHub Actions cache is invalidated, specify a glob pattern with the
|
||||
`cache-dependency-glob` input. The GitHub Actions cache will be invalidated if any file matching the glob pattern
|
||||
changes. If you use relative paths, they are relative to the repository root.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> You can look up supported patterns [here](https://github.com/actions/toolkit/tree/main/packages/glob#patterns)
|
||||
>
|
||||
> The default is
|
||||
> ```yaml
|
||||
> cache-dependency-glob: |
|
||||
> **/*requirements*.txt
|
||||
> **/*requirements*.in
|
||||
> **/*constraints*.txt
|
||||
> **/*constraints*.in
|
||||
> **/pyproject.toml
|
||||
> **/uv.lock
|
||||
> **/*.py.lock
|
||||
> ```
|
||||
|
||||
```yaml
|
||||
- name: Define a cache dependency glob
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "**/pyproject.toml"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Define a list of cache dependency globs
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
**/requirements*.txt
|
||||
**/pyproject.toml
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Define an absolute cache dependency glob
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Never invalidate the cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: ""
|
||||
```
|
||||
|
||||
#### Restore cache
|
||||
|
||||
Restoring an existing cache can be enabled or disabled with the `restore-cache` input.
|
||||
By default, the cache will be restored.
|
||||
|
||||
```yaml
|
||||
- name: Don't restore an existing cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
restore-cache: false
|
||||
```
|
||||
|
||||
#### Save cache
|
||||
|
||||
You can also disable saving the cache after the run with the `save-cache` input.
|
||||
This can be useful to save cache storage when you know you will not use the cache of the run again.
|
||||
By default, the cache will be saved.
|
||||
|
||||
```yaml
|
||||
- name: Don't save the cache after the run
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
save-cache: false
|
||||
```
|
||||
|
||||
### Local cache path
|
||||
|
||||
If caching is enabled, this action controls where uv stores its cache on the runner's filesystem
|
||||
by setting `UV_CACHE_DIR`.
|
||||
|
||||
It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\uv-tool-dir` on Windows and
|
||||
`/tmp/setup-uv-cache` on Linux/macOS. You can change the default by specifying the path with the
|
||||
`cache-local-path` input.
|
||||
|
||||
> [!NOTE]
|
||||
> If the environment variable `UV_CACHE_DIR` is already set this action will not override it.
|
||||
> If you configured [cache-dir](https://docs.astral.sh/uv/reference/settings/#cache-dir) in your
|
||||
> config file then it is also respected and this action will not set `UV_CACHE_DIR`.
|
||||
|
||||
```yaml
|
||||
- name: Define a custom uv cache path
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
cache-local-path: "/path/to/cache"
|
||||
```
|
||||
|
||||
### Disable cache pruning
|
||||
|
||||
By default, the uv cache is pruned after every run, removing pre-built wheels, but retaining any
|
||||
wheels that were built from source. On GitHub-hosted runners, it's typically faster to omit those
|
||||
pre-built wheels from the cache (and instead re-download them from the registry on each run).
|
||||
However, on self-hosted or local runners, preserving the cache may be more efficient. See
|
||||
the [documentation](https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration) for
|
||||
more information.
|
||||
|
||||
If you want to persist the entire cache across runs, disable cache pruning with the `prune-cache`
|
||||
input.
|
||||
|
||||
```yaml
|
||||
- name: Don't prune the cache before saving it
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
prune-cache: false
|
||||
```
|
||||
|
||||
### Cache Python installs
|
||||
|
||||
By default, the Python install dir (`uv python dir` / `UV_PYTHON_INSTALL_DIR`) is not cached,
|
||||
for the same reason that the dependency cache is pruned.
|
||||
If you want to cache Python installs along with your dependencies, set the `cache-python` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Cache Python installs
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
```
|
||||
|
||||
### Ignore nothing to cache
|
||||
|
||||
By default, the action will 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`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore nothing to cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
ignore-nothing-to-cache: true
|
||||
```
|
||||
|
||||
### Ignore empty workdir
|
||||
|
||||
By default, the action will warn if the workdir is empty, because this is usually the case when
|
||||
`actions/checkout` is configured to run after `setup-uv`, which is not supported.
|
||||
|
||||
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
|
||||
with:
|
||||
ignore-empty-workdir: true
|
||||
```
|
||||
|
||||
### GitHub authentication token
|
||||
|
||||
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API
|
||||
rate limit too quickly, an authentication token can be provided via the `github-token` input. By
|
||||
default, the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
|
||||
|
||||
If the default
|
||||
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
|
||||
are not sufficient, you can provide a custom GitHub token with the necessary permissions.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom GitHub token
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
### UV_TOOL_DIR
|
||||
|
||||
On Windows `UV_TOOL_DIR` is set to `uv-tool-dir` in the `TMP` dir (e.g. `D:\a\_temp\uv-tool-dir`).
|
||||
On GitHub hosted runners this is on the much faster `D:` drive.
|
||||
|
||||
On all other platforms the tool environments are placed in the
|
||||
[default location](https://docs.astral.sh/uv/concepts/tools/#tools-directory).
|
||||
|
||||
If you want to change this behaviour (especially on self-hosted runners) you can use the `tool-dir`
|
||||
input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool dir
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
tool-dir: "/path/to/tool/dir"
|
||||
```
|
||||
|
||||
### UV_TOOL_BIN_DIR
|
||||
|
||||
On Windows `UV_TOOL_BIN_DIR` is set to `uv-tool-bin-dir` in the `TMP` dir (e.g.
|
||||
`D:\a\_temp\uv-tool-bin-dir`). On GitHub hosted runners this is on the much faster `D:` drive. This
|
||||
path is also automatically added to the PATH.
|
||||
|
||||
On all other platforms the tool binaries get installed to the
|
||||
[default location](https://docs.astral.sh/uv/concepts/tools/#the-bin-directory).
|
||||
|
||||
If you want to change this behaviour (especially on self-hosted runners) you can use the
|
||||
`tool-bin-dir` input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool bin dir
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
tool-bin-dir: "/path/to/tool-bin/dir"
|
||||
```
|
||||
|
||||
### Tilde Expansion
|
||||
|
||||
This action supports expanding the `~` character to the user's home directory for the following inputs:
|
||||
|
||||
- `version-file`
|
||||
- `cache-local-path`
|
||||
- `tool-dir`
|
||||
- `tool-bin-dir`
|
||||
- `cache-dependency-glob`
|
||||
|
||||
```yaml
|
||||
- name: Expand the tilde character
|
||||
uses: astral-sh/setup-uv@v6
|
||||
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"
|
||||
```
|
||||
|
||||
### Manifest file
|
||||
|
||||
The `manifest-file` input allows you to specify a JSON manifest that lists available uv versions,
|
||||
architectures, and their download URLs. By default, this action uses the manifest file contained
|
||||
in this repository, which is automatically updated with each release of uv.
|
||||
|
||||
The manifest file contains an array of objects, each describing a version,
|
||||
architecture, platform, and the corresponding download URL. For example:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"version": "0.7.13",
|
||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
||||
"arch": "aarch64",
|
||||
"platform": "apple-darwin",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.7.13/uv-aarch64-apple-darwin.tar.gz"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
You can supply a custom manifest file URL to define additional versions,
|
||||
architectures, or different download URLs.
|
||||
This is useful if you maintain your own uv builds or want to override the default sources.
|
||||
|
||||
```yaml
|
||||
- name: Use a custom manifest file
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
manifest-file: "https://example.com/my-custom-manifest.json"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> When you use a custom manifest file and do not set the `version` input, its default value is `latest`.
|
||||
> This means the action will install the latest version available in the custom manifest file.
|
||||
> This is different from the default behavior of installing the latest version from the official uv releases.
|
||||
|
||||
### Add problem matchers
|
||||
|
||||
This action automatically adds
|
||||
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md)
|
||||
for python errors.
|
||||
|
||||
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
|
||||
with:
|
||||
add-problem-matchers: false
|
||||
```
|
||||
- **[Advanced Version Configuration](docs/advanced-version-configuration.md)** - Resolution strategies and version files
|
||||
- **[Caching](docs/caching.md)** - Complete guide to caching configuration
|
||||
- **[Environment and Tools](docs/environment-and-tools.md)** - Environment activation, tool directories, authentication, and environment variables
|
||||
- **[Customization](docs/customization.md)** - Checksum validation, custom manifests, and problem matchers
|
||||
|
||||
## How it works
|
||||
|
||||
@@ -549,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
|
||||
@@ -561,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
|
||||
@@ -580,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 }}"
|
||||
```
|
||||
@@ -589,14 +248,13 @@ output:
|
||||
|
||||
**Yes!**
|
||||
|
||||
The cache key gets computed by using the [cache-dependency-glob](#cache-dependency-glob).
|
||||
The cache key gets computed by using the cache-dependency-glob (see [Caching documentation](docs/caching.md)).
|
||||
|
||||
If you
|
||||
have jobs which use the same dependency definitions from `requirements.txt` or
|
||||
If you have jobs which use the same dependency definitions from `requirements.txt` or
|
||||
`pyproject.toml` but different
|
||||
[resolution strategies](https://docs.astral.sh/uv/concepts/resolution/#resolution-strategy),
|
||||
each job will have different dependencies or dependency versions.
|
||||
But if you do not add the resolution strategy as a [cache-suffix](#enable-caching),
|
||||
But if you do not add the resolution strategy as a cache-suffix (see [Caching documentation](docs/caching.md)),
|
||||
they will have the same cache key.
|
||||
|
||||
This means the first job which starts uploading its cache will win and all other job will fail
|
||||
@@ -609,15 +267,15 @@ You might see errors like
|
||||
### Why do I see warnings like `No GitHub Actions cache found for key`
|
||||
|
||||
When a workflow runs for the first time on a branch and has a new cache key, because the
|
||||
[cache-dependency-glob](#cache-dependency-glob) found changed files (changed dependencies),
|
||||
cache-dependency-glob (see [Caching documentation](docs/caching.md)) found changed files (changed dependencies),
|
||||
the cache will not be found and the warning `No GitHub Actions cache found for key` will be printed.
|
||||
|
||||
While this might be irritating at first, it is expected behaviour and the cache will be created
|
||||
and reused in later workflows.
|
||||
|
||||
The reason for the warning is, that we have to way to know if this is the first run of a new
|
||||
cache key or the user accidentally misconfigured the [cache-dependency-glob](#cache-dependency-glob)
|
||||
or [cache-suffix](#enable-caching) and the cache never gets used.
|
||||
cache key or the user accidentally misconfigured the cache-dependency-glob
|
||||
or cache-suffix (see [Caching documentation](docs/caching.md)) and the cache never gets used.
|
||||
|
||||
### Do I have to run `actions/checkout` before or after `setup-uv`?
|
||||
|
||||
@@ -642,11 +300,11 @@ if an uploaded cache exists for this key.
|
||||
If yes (e.g. contents of `uv.lock` did not change since last run) the dependencies in the cache
|
||||
are up to date and the cache will be downloaded and used.
|
||||
|
||||
Details on determining which files will lead to different caches can be read under
|
||||
[cache-dependency-glob](#cache-dependency-glob)
|
||||
Details on determining which files will lead to different caches can be read in the
|
||||
[Caching documentation](docs/caching.md).
|
||||
|
||||
Some dependencies will never be uploaded to the cache and will be downloaded again on each run
|
||||
as described in [disable-cache-pruning](#disable-cache-pruning)
|
||||
as described in the [Caching documentation](docs/caching.md).
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
|
||||
@@ -77,6 +77,9 @@ inputs:
|
||||
add-problem-matchers:
|
||||
description: "Add problem matchers."
|
||||
default: "true"
|
||||
resolution-strategy:
|
||||
description: "Resolution strategy to use when resolving version ranges. 'highest' uses the latest compatible version, 'lowest' uses the oldest compatible version."
|
||||
default: "highest"
|
||||
outputs:
|
||||
uv-version:
|
||||
description: "The installed uv version. Useful when using latest."
|
||||
|
||||
@@ -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": {
|
||||
|
||||
63
dist/save-cache/index.js
generated
vendored
63
dist/save-cache/index.js
generated
vendored
@@ -39,7 +39,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0;
|
||||
exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.FinalizeCacheError = exports.ReserveCacheError = exports.ValidationError = void 0;
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const path = __importStar(__nccwpck_require__(6928));
|
||||
const utils = __importStar(__nccwpck_require__(8299));
|
||||
@@ -47,7 +47,6 @@ const cacheHttpClient = __importStar(__nccwpck_require__(3171));
|
||||
const cacheTwirpClient = __importStar(__nccwpck_require__(6819));
|
||||
const config_1 = __nccwpck_require__(7606);
|
||||
const tar_1 = __nccwpck_require__(5321);
|
||||
const constants_1 = __nccwpck_require__(8287);
|
||||
const http_client_1 = __nccwpck_require__(4844);
|
||||
class ValidationError extends Error {
|
||||
constructor(message) {
|
||||
@@ -65,6 +64,14 @@ class ReserveCacheError extends Error {
|
||||
}
|
||||
}
|
||||
exports.ReserveCacheError = ReserveCacheError;
|
||||
class FinalizeCacheError extends Error {
|
||||
constructor(message) {
|
||||
super(message);
|
||||
this.name = 'FinalizeCacheError';
|
||||
Object.setPrototypeOf(this, FinalizeCacheError.prototype);
|
||||
}
|
||||
}
|
||||
exports.FinalizeCacheError = FinalizeCacheError;
|
||||
function checkPaths(paths) {
|
||||
if (!paths || paths.length === 0) {
|
||||
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
|
||||
@@ -441,10 +448,6 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||
}
|
||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||
core.debug(`File Size: ${archiveFileSize}`);
|
||||
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
|
||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||
}
|
||||
// Set the archive size in the options, will be used to display the upload progress
|
||||
options.archiveSizeBytes = archiveFileSize;
|
||||
core.debug('Reserving Cache');
|
||||
@@ -457,7 +460,10 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||
try {
|
||||
const response = yield twirpClient.CreateCacheEntry(request);
|
||||
if (!response.ok) {
|
||||
throw new Error('Response was not ok');
|
||||
if (response.message) {
|
||||
core.warning(`Cache reservation failed: ${response.message}`);
|
||||
}
|
||||
throw new Error(response.message || 'Response was not ok');
|
||||
}
|
||||
signedUploadUrl = response.signedUploadUrl;
|
||||
}
|
||||
@@ -475,6 +481,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
||||
core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
|
||||
if (!finalizeResponse.ok) {
|
||||
if (finalizeResponse.message) {
|
||||
throw new FinalizeCacheError(finalizeResponse.message);
|
||||
}
|
||||
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||
}
|
||||
cacheId = parseInt(finalizeResponse.entryId);
|
||||
@@ -487,6 +496,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||
else if (typedError.name === ReserveCacheError.name) {
|
||||
core.info(`Failed to save: ${typedError.message}`);
|
||||
}
|
||||
else if (typedError.name === FinalizeCacheError.name) {
|
||||
core.warning(typedError.message);
|
||||
}
|
||||
else {
|
||||
// Log server errors (5xx) as errors, all other errors as warnings
|
||||
if (typedError instanceof http_client_1.HttpClientError &&
|
||||
@@ -598,11 +610,12 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
|
||||
constructor() {
|
||||
super("github.actions.results.api.v1.CreateCacheEntryResponse", [
|
||||
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value) {
|
||||
const message = { ok: false, signedUploadUrl: "" };
|
||||
const message = { ok: false, signedUploadUrl: "", message: "" };
|
||||
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
(0, runtime_3.reflectionMergePartial)(this, message, value);
|
||||
@@ -619,6 +632,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
|
||||
case /* string signed_upload_url */ 2:
|
||||
message.signedUploadUrl = reader.string();
|
||||
break;
|
||||
case /* string message */ 3:
|
||||
message.message = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -637,6 +653,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
|
||||
/* string signed_upload_url = 2; */
|
||||
if (message.signedUploadUrl !== "")
|
||||
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
|
||||
/* string message = 3; */
|
||||
if (message.message !== "")
|
||||
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -720,11 +739,12 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
|
||||
constructor() {
|
||||
super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [
|
||||
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
|
||||
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
|
||||
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value) {
|
||||
const message = { ok: false, entryId: "0" };
|
||||
const message = { ok: false, entryId: "0", message: "" };
|
||||
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
(0, runtime_3.reflectionMergePartial)(this, message, value);
|
||||
@@ -741,6 +761,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
|
||||
case /* int64 entry_id */ 2:
|
||||
message.entryId = reader.int64().toString();
|
||||
break;
|
||||
case /* string message */ 3:
|
||||
message.message = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -759,6 +782,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
|
||||
/* int64 entry_id = 2; */
|
||||
if (message.entryId !== "0")
|
||||
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
|
||||
/* string message = 3; */
|
||||
if (message.message !== "")
|
||||
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -91010,7 +91036,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
|
||||
exports.resolutionStrategy = exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
|
||||
exports.getUvPythonDir = getUvPythonDir;
|
||||
const node_path_1 = __importDefault(__nccwpck_require__(6760));
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
@@ -91037,6 +91063,7 @@ exports.pythonDir = getUvPythonDir();
|
||||
exports.githubToken = core.getInput("github-token");
|
||||
exports.manifestFile = getManifestFile();
|
||||
exports.addProblemMatchers = core.getInput("add-problem-matchers") === "true";
|
||||
exports.resolutionStrategy = getResolutionStrategy();
|
||||
function getVersionFile() {
|
||||
const versionFileInput = core.getInput("version-file");
|
||||
if (versionFileInput !== "") {
|
||||
@@ -91173,6 +91200,16 @@ function getManifestFile() {
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
function getResolutionStrategy() {
|
||||
const resolutionStrategyInput = core.getInput("resolution-strategy");
|
||||
if (resolutionStrategyInput === "lowest") {
|
||||
return "lowest";
|
||||
}
|
||||
if (resolutionStrategyInput === "highest" || resolutionStrategyInput === "") {
|
||||
return "highest";
|
||||
}
|
||||
throw new Error(`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`);
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -94097,7 +94134,7 @@ var index_default = { parse, stringify, TomlDate, TomlError };
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.5","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.1.0","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
||||
149
dist/setup/index.js
generated
vendored
149
dist/setup/index.js
generated
vendored
@@ -39,7 +39,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0;
|
||||
exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.FinalizeCacheError = exports.ReserveCacheError = exports.ValidationError = void 0;
|
||||
const core = __importStar(__nccwpck_require__(37484));
|
||||
const path = __importStar(__nccwpck_require__(16928));
|
||||
const utils = __importStar(__nccwpck_require__(98299));
|
||||
@@ -47,7 +47,6 @@ const cacheHttpClient = __importStar(__nccwpck_require__(73171));
|
||||
const cacheTwirpClient = __importStar(__nccwpck_require__(96819));
|
||||
const config_1 = __nccwpck_require__(17606);
|
||||
const tar_1 = __nccwpck_require__(95321);
|
||||
const constants_1 = __nccwpck_require__(58287);
|
||||
const http_client_1 = __nccwpck_require__(54844);
|
||||
class ValidationError extends Error {
|
||||
constructor(message) {
|
||||
@@ -65,6 +64,14 @@ class ReserveCacheError extends Error {
|
||||
}
|
||||
}
|
||||
exports.ReserveCacheError = ReserveCacheError;
|
||||
class FinalizeCacheError extends Error {
|
||||
constructor(message) {
|
||||
super(message);
|
||||
this.name = 'FinalizeCacheError';
|
||||
Object.setPrototypeOf(this, FinalizeCacheError.prototype);
|
||||
}
|
||||
}
|
||||
exports.FinalizeCacheError = FinalizeCacheError;
|
||||
function checkPaths(paths) {
|
||||
if (!paths || paths.length === 0) {
|
||||
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
|
||||
@@ -441,10 +448,6 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||
}
|
||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||
core.debug(`File Size: ${archiveFileSize}`);
|
||||
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
|
||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||
}
|
||||
// Set the archive size in the options, will be used to display the upload progress
|
||||
options.archiveSizeBytes = archiveFileSize;
|
||||
core.debug('Reserving Cache');
|
||||
@@ -457,7 +460,10 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||
try {
|
||||
const response = yield twirpClient.CreateCacheEntry(request);
|
||||
if (!response.ok) {
|
||||
throw new Error('Response was not ok');
|
||||
if (response.message) {
|
||||
core.warning(`Cache reservation failed: ${response.message}`);
|
||||
}
|
||||
throw new Error(response.message || 'Response was not ok');
|
||||
}
|
||||
signedUploadUrl = response.signedUploadUrl;
|
||||
}
|
||||
@@ -475,6 +481,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
||||
core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
|
||||
if (!finalizeResponse.ok) {
|
||||
if (finalizeResponse.message) {
|
||||
throw new FinalizeCacheError(finalizeResponse.message);
|
||||
}
|
||||
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||
}
|
||||
cacheId = parseInt(finalizeResponse.entryId);
|
||||
@@ -487,6 +496,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||
else if (typedError.name === ReserveCacheError.name) {
|
||||
core.info(`Failed to save: ${typedError.message}`);
|
||||
}
|
||||
else if (typedError.name === FinalizeCacheError.name) {
|
||||
core.warning(typedError.message);
|
||||
}
|
||||
else {
|
||||
// Log server errors (5xx) as errors, all other errors as warnings
|
||||
if (typedError instanceof http_client_1.HttpClientError &&
|
||||
@@ -598,11 +610,12 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
|
||||
constructor() {
|
||||
super("github.actions.results.api.v1.CreateCacheEntryResponse", [
|
||||
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value) {
|
||||
const message = { ok: false, signedUploadUrl: "" };
|
||||
const message = { ok: false, signedUploadUrl: "", message: "" };
|
||||
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
(0, runtime_3.reflectionMergePartial)(this, message, value);
|
||||
@@ -619,6 +632,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
|
||||
case /* string signed_upload_url */ 2:
|
||||
message.signedUploadUrl = reader.string();
|
||||
break;
|
||||
case /* string message */ 3:
|
||||
message.message = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -637,6 +653,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
|
||||
/* string signed_upload_url = 2; */
|
||||
if (message.signedUploadUrl !== "")
|
||||
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
|
||||
/* string message = 3; */
|
||||
if (message.message !== "")
|
||||
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -720,11 +739,12 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
|
||||
constructor() {
|
||||
super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [
|
||||
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
|
||||
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
|
||||
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value) {
|
||||
const message = { ok: false, entryId: "0" };
|
||||
const message = { ok: false, entryId: "0", message: "" };
|
||||
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
(0, runtime_3.reflectionMergePartial)(this, message, value);
|
||||
@@ -741,6 +761,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
|
||||
case /* int64 entry_id */ 2:
|
||||
message.entryId = reader.int64().toString();
|
||||
break;
|
||||
case /* string message */ 3:
|
||||
message.message = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -759,6 +782,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
|
||||
/* int64 entry_id = 2; */
|
||||
if (message.entryId !== "0")
|
||||
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
|
||||
/* string message = 3; */
|
||||
if (message.message !== "")
|
||||
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -125325,6 +125351,42 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KNOWN_CHECKSUMS = void 0;
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
exports.KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.9.4": "52793821b13ac7e424f76c47f544b103a9bdd10546f165b327eba225d0ba4993",
|
||||
"aarch64-pc-windows-msvc-0.9.4": "cebd4cc1bfb1f9876903b528eb8d096dff701be9e1b0da04dab2f7151ec8ae11",
|
||||
"aarch64-unknown-linux-gnu-0.9.4": "c507e8cc4df18ed16533364013d93c2ace2c7f81a2a0d892a0dc833915b02e8b",
|
||||
"aarch64-unknown-linux-musl-0.9.4": "c66e99128739ff1ff34c1c883d4b85f72ba1b7ce1c192c07f8327f43172e8d06",
|
||||
"arm-unknown-linux-musleabihf-0.9.4": "25cfc8bf0f133c9f85f6627dc08d955e0ad80927e01b2e26c68de2470b6e38e6",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.4": "ebc126709a6ec2863ff22b0cae7ecd50b2094a88e269da674e382ddfb1da4881",
|
||||
"armv7-unknown-linux-musleabihf-0.9.4": "aa002dc4f272ceb02b5535c80a5b043a61b1d45c0234b4bdcae42096c0b25831",
|
||||
"i686-pc-windows-msvc-0.9.4": "c3bf7eb197164d3d63651412ff84185efc9c5b77509db120493dd84df6883ed4",
|
||||
"i686-unknown-linux-gnu-0.9.4": "df07db314f640d981fd057fdbb4d139248e79743d802137a0334de70952232da",
|
||||
"i686-unknown-linux-musl-0.9.4": "63fe6e880420411a5d8e42ea94ba8e21f503fd7c0b430c0cc0a7c4293f9d8ed3",
|
||||
"powerpc64-unknown-linux-gnu-0.9.4": "0b1526e807c7e3ce564b00db6b502ed6110f147e2db1eaf88f86c38fdf63af83",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.4": "eff46de91f1d7db051822c9f42e8e7ad06d8e77caa9fe8e9aa9d6e00bdc388af",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.4": "7d58c5bbbeb7417eb8e5bdc638e2c45ed7515190fe65e8407674d5efa2aab51c",
|
||||
"s390x-unknown-linux-gnu-0.9.4": "7936fdcd29e3dac647d2966643835c6c91fbae05afe0b67a400dea73df96cc86",
|
||||
"x86_64-apple-darwin-0.9.4": "b6a9682124666840031bde1f7a9ab6ca7389d918b4ee5f3d7e318ad574bb5936",
|
||||
"x86_64-pc-windows-msvc-0.9.4": "6529c0039c89754d5e2d19a8869694b2f6c7c5a27e89bfe44037fef8077dcc30",
|
||||
"x86_64-unknown-linux-gnu-0.9.4": "e02f7fc102d6a1ebfa3b260b788e9adf35802be28c8d85640e83246e61519c1e",
|
||||
"x86_64-unknown-linux-musl-0.9.4": "89c128a9bb7a0086cc35922401c20099337db84294c7997dd3df79b9f3157c45",
|
||||
"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",
|
||||
@@ -129114,6 +129176,7 @@ const path = __importStar(__nccwpck_require__(76760));
|
||||
const core = __importStar(__nccwpck_require__(37484));
|
||||
const tc = __importStar(__nccwpck_require__(33472));
|
||||
const pep440 = __importStar(__nccwpck_require__(63297));
|
||||
const semver = __importStar(__nccwpck_require__(39318));
|
||||
const constants_1 = __nccwpck_require__(56156);
|
||||
const octokit_1 = __nccwpck_require__(73352);
|
||||
const checksum_1 = __nccwpck_require__(17772);
|
||||
@@ -129165,28 +129228,29 @@ async function downloadVersion(downloadUrl, artifactName, platform, arch, versio
|
||||
function getExtension(platform) {
|
||||
return platform === "pc-windows-msvc" ? ".zip" : ".tar.gz";
|
||||
}
|
||||
async function resolveVersion(versionInput, manifestFile, githubToken) {
|
||||
async function resolveVersion(versionInput, manifestFile, githubToken, resolutionStrategy = "highest") {
|
||||
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}`);
|
||||
}
|
||||
@@ -129195,7 +129259,9 @@ async function resolveVersion(versionInput, manifestFile, githubToken) {
|
||||
}
|
||||
const availableVersions = await getAvailableVersions(githubToken);
|
||||
core.debug(`Available versions: ${availableVersions}`);
|
||||
const resolvedVersion = maxSatisfying(availableVersions, version);
|
||||
const resolvedVersion = resolutionStrategy === "lowest"
|
||||
? minSatisfying(availableVersions, version)
|
||||
: maxSatisfying(availableVersions, version);
|
||||
if (resolvedVersion === undefined) {
|
||||
throw new Error(`No version found for ${version}`);
|
||||
}
|
||||
@@ -129275,6 +129341,21 @@ function maxSatisfying(versions, version) {
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
function minSatisfying(versions, version) {
|
||||
// For semver, we need to use a different approach since tc.evaluateVersions only returns max
|
||||
// Let's use semver directly for min satisfying
|
||||
const minSemver = semver.minSatisfying(versions, version);
|
||||
if (minSemver !== null) {
|
||||
core.debug(`Found a version that satisfies the semver range: ${minSemver}`);
|
||||
return minSemver;
|
||||
}
|
||||
const minPep440 = pep440.minSatisfying(versions, version);
|
||||
if (minPep440 !== null) {
|
||||
core.debug(`Found a version that satisfies the pep440 specifier: ${minPep440}`);
|
||||
return minPep440;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -129556,7 +129637,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");
|
||||
}
|
||||
@@ -129583,21 +129664,21 @@ async function setupUv(platform, arch, checkSum, githubToken) {
|
||||
}
|
||||
async function determineVersion(manifestFile) {
|
||||
if (inputs_1.version !== "") {
|
||||
return await (0, download_version_1.resolveVersion)(inputs_1.version, manifestFile, inputs_1.githubToken);
|
||||
return await (0, download_version_1.resolveVersion)(inputs_1.version, manifestFile, inputs_1.githubToken, inputs_1.resolutionStrategy);
|
||||
}
|
||||
if (inputs_1.versionFile !== "") {
|
||||
const versionFromFile = (0, resolve_1.getUvVersionFromFile)(inputs_1.versionFile);
|
||||
if (versionFromFile === undefined) {
|
||||
throw new Error(`Could not determine uv version from file: ${inputs_1.versionFile}`);
|
||||
}
|
||||
return await (0, download_version_1.resolveVersion)(versionFromFile, manifestFile, inputs_1.githubToken);
|
||||
return await (0, download_version_1.resolveVersion)(versionFromFile, manifestFile, inputs_1.githubToken, inputs_1.resolutionStrategy);
|
||||
}
|
||||
const versionFromUvToml = (0, resolve_1.getUvVersionFromFile)(`${inputs_1.workingDirectory}${path.sep}uv.toml`);
|
||||
const versionFromPyproject = (0, resolve_1.getUvVersionFromFile)(`${inputs_1.workingDirectory}${path.sep}pyproject.toml`);
|
||||
if (versionFromUvToml === undefined && versionFromPyproject === undefined) {
|
||||
core.info("Could not determine uv version from uv.toml or pyproject.toml. Falling back to latest.");
|
||||
}
|
||||
return await (0, download_version_1.resolveVersion)(versionFromUvToml || versionFromPyproject || "latest", manifestFile, inputs_1.githubToken);
|
||||
return await (0, download_version_1.resolveVersion)(versionFromUvToml || versionFromPyproject || "latest", manifestFile, inputs_1.githubToken, inputs_1.resolutionStrategy);
|
||||
}
|
||||
function addUvToPathAndOutput(cachedPath) {
|
||||
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
||||
@@ -129853,7 +129934,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
|
||||
exports.resolutionStrategy = exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
|
||||
exports.getUvPythonDir = getUvPythonDir;
|
||||
const node_path_1 = __importDefault(__nccwpck_require__(76760));
|
||||
const core = __importStar(__nccwpck_require__(37484));
|
||||
@@ -129880,6 +129961,7 @@ exports.pythonDir = getUvPythonDir();
|
||||
exports.githubToken = core.getInput("github-token");
|
||||
exports.manifestFile = getManifestFile();
|
||||
exports.addProblemMatchers = core.getInput("add-problem-matchers") === "true";
|
||||
exports.resolutionStrategy = getResolutionStrategy();
|
||||
function getVersionFile() {
|
||||
const versionFileInput = core.getInput("version-file");
|
||||
if (versionFileInput !== "") {
|
||||
@@ -130016,6 +130098,16 @@ function getManifestFile() {
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
function getResolutionStrategy() {
|
||||
const resolutionStrategyInput = core.getInput("resolution-strategy");
|
||||
if (resolutionStrategyInput === "lowest") {
|
||||
return "lowest";
|
||||
}
|
||||
if (resolutionStrategyInput === "highest" || resolutionStrategyInput === "") {
|
||||
return "highest";
|
||||
}
|
||||
throw new Error(`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`);
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -134756,9 +134848,11 @@ var paginatingEndpoints = [
|
||||
"GET /networks/{owner}/{repo}/events",
|
||||
"GET /notifications",
|
||||
"GET /organizations",
|
||||
"GET /organizations/{org}/dependabot/repository-access",
|
||||
"GET /orgs/{org}/actions/cache/usage-by-repository",
|
||||
"GET /orgs/{org}/actions/hosted-runners",
|
||||
"GET /orgs/{org}/actions/permissions/repositories",
|
||||
"GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
|
||||
@@ -134808,6 +134902,9 @@ var paginatingEndpoints = [
|
||||
"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories",
|
||||
"GET /orgs/{org}/private-registries",
|
||||
"GET /orgs/{org}/projects",
|
||||
"GET /orgs/{org}/projectsV2",
|
||||
"GET /orgs/{org}/projectsV2/{project_number}/fields",
|
||||
"GET /orgs/{org}/projectsV2/{project_number}/items",
|
||||
"GET /orgs/{org}/properties/values",
|
||||
"GET /orgs/{org}/public_members",
|
||||
"GET /orgs/{org}/repos",
|
||||
@@ -134828,7 +134925,6 @@ var paginatingEndpoints = [
|
||||
"GET /orgs/{org}/teams/{team_slug}/projects",
|
||||
"GET /orgs/{org}/teams/{team_slug}/repos",
|
||||
"GET /orgs/{org}/teams/{team_slug}/teams",
|
||||
"GET /projects/columns/{column_id}/cards",
|
||||
"GET /projects/{project_id}/collaborators",
|
||||
"GET /projects/{project_id}/columns",
|
||||
"GET /repos/{owner}/{repo}/actions/artifacts",
|
||||
@@ -134888,6 +134984,8 @@ var paginatingEndpoints = [
|
||||
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
|
||||
@@ -134968,6 +135066,8 @@ var paginatingEndpoints = [
|
||||
"GET /user/subscriptions",
|
||||
"GET /user/teams",
|
||||
"GET /users",
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/fields",
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/items",
|
||||
"GET /users/{username}/attestations/{subject_digest}",
|
||||
"GET /users/{username}/events",
|
||||
"GET /users/{username}/events/orgs/{org}",
|
||||
@@ -134980,6 +135080,7 @@ var paginatingEndpoints = [
|
||||
"GET /users/{username}/orgs",
|
||||
"GET /users/{username}/packages",
|
||||
"GET /users/{username}/projects",
|
||||
"GET /users/{username}/projectsV2",
|
||||
"GET /users/{username}/received_events",
|
||||
"GET /users/{username}/received_events/public",
|
||||
"GET /users/{username}/repos",
|
||||
@@ -137378,7 +137479,7 @@ legacyRestEndpointMethods.VERSION = VERSION;
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.5","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.1.0","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
||||
47
dist/update-known-versions/index.js
generated
vendored
47
dist/update-known-versions/index.js
generated
vendored
@@ -61851,6 +61851,42 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KNOWN_CHECKSUMS = void 0;
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
exports.KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.9.4": "52793821b13ac7e424f76c47f544b103a9bdd10546f165b327eba225d0ba4993",
|
||||
"aarch64-pc-windows-msvc-0.9.4": "cebd4cc1bfb1f9876903b528eb8d096dff701be9e1b0da04dab2f7151ec8ae11",
|
||||
"aarch64-unknown-linux-gnu-0.9.4": "c507e8cc4df18ed16533364013d93c2ace2c7f81a2a0d892a0dc833915b02e8b",
|
||||
"aarch64-unknown-linux-musl-0.9.4": "c66e99128739ff1ff34c1c883d4b85f72ba1b7ce1c192c07f8327f43172e8d06",
|
||||
"arm-unknown-linux-musleabihf-0.9.4": "25cfc8bf0f133c9f85f6627dc08d955e0ad80927e01b2e26c68de2470b6e38e6",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.4": "ebc126709a6ec2863ff22b0cae7ecd50b2094a88e269da674e382ddfb1da4881",
|
||||
"armv7-unknown-linux-musleabihf-0.9.4": "aa002dc4f272ceb02b5535c80a5b043a61b1d45c0234b4bdcae42096c0b25831",
|
||||
"i686-pc-windows-msvc-0.9.4": "c3bf7eb197164d3d63651412ff84185efc9c5b77509db120493dd84df6883ed4",
|
||||
"i686-unknown-linux-gnu-0.9.4": "df07db314f640d981fd057fdbb4d139248e79743d802137a0334de70952232da",
|
||||
"i686-unknown-linux-musl-0.9.4": "63fe6e880420411a5d8e42ea94ba8e21f503fd7c0b430c0cc0a7c4293f9d8ed3",
|
||||
"powerpc64-unknown-linux-gnu-0.9.4": "0b1526e807c7e3ce564b00db6b502ed6110f147e2db1eaf88f86c38fdf63af83",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.4": "eff46de91f1d7db051822c9f42e8e7ad06d8e77caa9fe8e9aa9d6e00bdc388af",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.4": "7d58c5bbbeb7417eb8e5bdc638e2c45ed7515190fe65e8407674d5efa2aab51c",
|
||||
"s390x-unknown-linux-gnu-0.9.4": "7936fdcd29e3dac647d2966643835c6c91fbae05afe0b67a400dea73df96cc86",
|
||||
"x86_64-apple-darwin-0.9.4": "b6a9682124666840031bde1f7a9ab6ca7389d918b4ee5f3d7e318ad574bb5936",
|
||||
"x86_64-pc-windows-msvc-0.9.4": "6529c0039c89754d5e2d19a8869694b2f6c7c5a27e89bfe44037fef8077dcc30",
|
||||
"x86_64-unknown-linux-gnu-0.9.4": "e02f7fc102d6a1ebfa3b260b788e9adf35802be28c8d85640e83246e61519c1e",
|
||||
"x86_64-unknown-linux-musl-0.9.4": "89c128a9bb7a0086cc35922401c20099337db84294c7997dd3df79b9f3157c45",
|
||||
"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",
|
||||
@@ -69397,9 +69433,11 @@ var paginatingEndpoints = [
|
||||
"GET /networks/{owner}/{repo}/events",
|
||||
"GET /notifications",
|
||||
"GET /organizations",
|
||||
"GET /organizations/{org}/dependabot/repository-access",
|
||||
"GET /orgs/{org}/actions/cache/usage-by-repository",
|
||||
"GET /orgs/{org}/actions/hosted-runners",
|
||||
"GET /orgs/{org}/actions/permissions/repositories",
|
||||
"GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
|
||||
@@ -69449,6 +69487,9 @@ var paginatingEndpoints = [
|
||||
"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories",
|
||||
"GET /orgs/{org}/private-registries",
|
||||
"GET /orgs/{org}/projects",
|
||||
"GET /orgs/{org}/projectsV2",
|
||||
"GET /orgs/{org}/projectsV2/{project_number}/fields",
|
||||
"GET /orgs/{org}/projectsV2/{project_number}/items",
|
||||
"GET /orgs/{org}/properties/values",
|
||||
"GET /orgs/{org}/public_members",
|
||||
"GET /orgs/{org}/repos",
|
||||
@@ -69469,7 +69510,6 @@ var paginatingEndpoints = [
|
||||
"GET /orgs/{org}/teams/{team_slug}/projects",
|
||||
"GET /orgs/{org}/teams/{team_slug}/repos",
|
||||
"GET /orgs/{org}/teams/{team_slug}/teams",
|
||||
"GET /projects/columns/{column_id}/cards",
|
||||
"GET /projects/{project_id}/collaborators",
|
||||
"GET /projects/{project_id}/columns",
|
||||
"GET /repos/{owner}/{repo}/actions/artifacts",
|
||||
@@ -69529,6 +69569,8 @@ var paginatingEndpoints = [
|
||||
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
|
||||
@@ -69609,6 +69651,8 @@ var paginatingEndpoints = [
|
||||
"GET /user/subscriptions",
|
||||
"GET /user/teams",
|
||||
"GET /users",
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/fields",
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/items",
|
||||
"GET /users/{username}/attestations/{subject_digest}",
|
||||
"GET /users/{username}/events",
|
||||
"GET /users/{username}/events/orgs/{org}",
|
||||
@@ -69621,6 +69665,7 @@ var paginatingEndpoints = [
|
||||
"GET /users/{username}/orgs",
|
||||
"GET /users/{username}/packages",
|
||||
"GET /users/{username}/projects",
|
||||
"GET /users/{username}/projectsV2",
|
||||
"GET /users/{username}/received_events",
|
||||
"GET /users/{username}/received_events/public",
|
||||
"GET /users/{username}/repos",
|
||||
|
||||
82
docs/advanced-version-configuration.md
Normal file
82
docs/advanced-version-configuration.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# Advanced Version Configuration
|
||||
|
||||
This document covers advanced options for configuring which version of uv to install.
|
||||
|
||||
## Install the latest version
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "latest"
|
||||
```
|
||||
|
||||
## Install a specific version
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "0.4.4"
|
||||
```
|
||||
|
||||
## Install a version by supplying a semver range or pep440 specifier
|
||||
|
||||
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
|
||||
or [pep440 specifier](https://peps.python.org/pep-0440/#version-specifiers)
|
||||
to install the latest version that satisfies the range.
|
||||
|
||||
```yaml
|
||||
- name: Install a semver range of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Pinning a minor version of uv
|
||||
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@v7
|
||||
with:
|
||||
version: ">=0.4.25,<0.5"
|
||||
```
|
||||
|
||||
## Resolution strategy
|
||||
|
||||
By default, when resolving version ranges, setup-uv will install the highest compatible version.
|
||||
You can change this behavior using the `resolution-strategy` input:
|
||||
|
||||
```yaml
|
||||
- name: Install the lowest compatible version of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
resolution-strategy: "lowest"
|
||||
```
|
||||
|
||||
The supported resolution strategies are:
|
||||
- `highest` (default): Install the latest version that satisfies the constraints
|
||||
- `lowest`: Install the oldest version that satisfies the constraints
|
||||
|
||||
This can be useful for testing compatibility with older versions of uv, similar to uv's own `--resolution-strategy` option.
|
||||
|
||||
## Install a version defined in a requirements or config file
|
||||
|
||||
You can use the `version-file` input to specify a file that contains the version of uv to install.
|
||||
This can either be a `pyproject.toml` or `uv.toml` file which defines a `required-version` or
|
||||
uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
|
||||
|
||||
[asdf](https://asdf-vm.com/) `.tool-versions` is also supported, but without the `ref` syntax.
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the version defined in pyproject.toml
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version-file: "pyproject.toml"
|
||||
```
|
||||
189
docs/caching.md
Normal file
189
docs/caching.md
Normal file
@@ -0,0 +1,189 @@
|
||||
# Caching
|
||||
|
||||
This document covers all caching-related configuration options for setup-uv.
|
||||
|
||||
## Enable caching
|
||||
|
||||
> [!NOTE]
|
||||
> The cache is pruned before it is uploaded to the GitHub Actions cache. This can lead to
|
||||
> a small or empty cache. See [Disable cache pruning](#disable-cache-pruning) for more details.
|
||||
|
||||
If you enable caching, the [uv cache](https://docs.astral.sh/uv/concepts/cache/) will be uploaded to
|
||||
the GitHub Actions cache. This can speed up runs that reuse the cache by several minutes.
|
||||
Caching is enabled by default on GitHub-hosted runners.
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> On self-hosted runners this is usually not needed since the cache generated by uv on the runner's
|
||||
> filesystem is not removed after a run. For more details see [Local cache path](#local-cache-path).
|
||||
|
||||
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@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: "optional-suffix"
|
||||
```
|
||||
|
||||
When the cache was successfully restored, the output `cache-hit` will be set to `true` and you can
|
||||
use it in subsequent steps. For example, to use the cache in the above case:
|
||||
|
||||
```yaml
|
||||
- name: Do something if the cache was restored
|
||||
if: steps.setup-uv.outputs.cache-hit == 'true'
|
||||
run: echo "Cache was restored"
|
||||
```
|
||||
|
||||
## Cache dependency glob
|
||||
|
||||
If you want to control when the GitHub Actions cache is invalidated, specify a glob pattern with the
|
||||
`cache-dependency-glob` input. The GitHub Actions cache will be invalidated if any file matching the glob pattern
|
||||
changes. If you use relative paths, they are relative to the repository root.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> You can look up supported patterns [here](https://github.com/actions/toolkit/tree/main/packages/glob#patterns)
|
||||
>
|
||||
> The default is
|
||||
> ```yaml
|
||||
> cache-dependency-glob: |
|
||||
> **/*requirements*.txt
|
||||
> **/*requirements*.in
|
||||
> **/*constraints*.txt
|
||||
> **/*constraints*.in
|
||||
> **/pyproject.toml
|
||||
> **/uv.lock
|
||||
> **/*.py.lock
|
||||
> ```
|
||||
|
||||
```yaml
|
||||
- name: Define a cache dependency glob
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "**/pyproject.toml"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Define a list of cache dependency globs
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
**/requirements*.txt
|
||||
**/pyproject.toml
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Define an absolute cache dependency glob
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Never invalidate the cache
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: ""
|
||||
```
|
||||
|
||||
## Restore cache
|
||||
|
||||
Restoring an existing cache can be enabled or disabled with the `restore-cache` input.
|
||||
By default, the cache will be restored.
|
||||
|
||||
```yaml
|
||||
- name: Don't restore an existing cache
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
restore-cache: false
|
||||
```
|
||||
|
||||
## Save cache
|
||||
|
||||
You can also disable saving the cache after the run with the `save-cache` input.
|
||||
This can be useful to save cache storage when you know you will not use the cache of the run again.
|
||||
By default, the cache will be saved.
|
||||
|
||||
```yaml
|
||||
- name: Don't save the cache after the run
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
save-cache: false
|
||||
```
|
||||
|
||||
## Local cache path
|
||||
|
||||
If caching is enabled, this action controls where uv stores its cache on the runner's filesystem
|
||||
by setting `UV_CACHE_DIR`.
|
||||
|
||||
It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\setup-uv-cache` on Windows and
|
||||
`/tmp/setup-uv-cache` on Linux/macOS. You can change the default by specifying the path with the
|
||||
`cache-local-path` input.
|
||||
|
||||
> [!NOTE]
|
||||
> If the environment variable `UV_CACHE_DIR` is already set this action will not override it.
|
||||
> If you configured [cache-dir](https://docs.astral.sh/uv/reference/settings/#cache-dir) in your
|
||||
> config file then it is also respected and this action will not set `UV_CACHE_DIR`.
|
||||
|
||||
```yaml
|
||||
- name: Define a custom uv cache path
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
cache-local-path: "/path/to/cache"
|
||||
```
|
||||
|
||||
## Disable cache pruning
|
||||
|
||||
By default, the uv cache is pruned after every run, removing pre-built wheels, but retaining any
|
||||
wheels that were built from source. On GitHub-hosted runners, it's typically faster to omit those
|
||||
pre-built wheels from the cache (and instead re-download them from the registry on each run).
|
||||
However, on self-hosted or local runners, preserving the cache may be more efficient. See
|
||||
the [documentation](https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration) for
|
||||
more information.
|
||||
|
||||
If you want to persist the entire cache across runs, disable cache pruning with the `prune-cache`
|
||||
input.
|
||||
|
||||
```yaml
|
||||
- name: Don't prune the cache before saving it
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
prune-cache: false
|
||||
```
|
||||
|
||||
## Cache Python installs
|
||||
|
||||
By default, the Python install dir (`uv python dir` / `UV_PYTHON_INSTALL_DIR`) is not cached,
|
||||
for the same reason that the dependency cache is pruned.
|
||||
If you want to cache Python installs along with your dependencies, set the `cache-python` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Cache Python installs
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
```
|
||||
|
||||
## Ignore nothing to cache
|
||||
|
||||
By default, the action will 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`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore nothing to cache
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
ignore-nothing-to-cache: true
|
||||
```
|
||||
70
docs/customization.md
Normal file
70
docs/customization.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Customization
|
||||
|
||||
This document covers advanced customization options including checksum validation, custom manifests, and problem matchers.
|
||||
|
||||
## Validate checksum
|
||||
|
||||
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
|
||||
are automatically verified by this action. The sha256 hashes can be found on the
|
||||
[releases page](https://github.com/astral-sh/uv/releases) of the uv repo.
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version and validate the checksum
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "0.3.1"
|
||||
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
|
||||
```
|
||||
|
||||
## Manifest file
|
||||
|
||||
The `manifest-file` input allows you to specify a JSON manifest that lists available uv versions,
|
||||
architectures, and their download URLs. By default, this action uses the manifest file contained
|
||||
in this repository, which is automatically updated with each release of uv.
|
||||
|
||||
The manifest file contains an array of objects, each describing a version,
|
||||
architecture, platform, and the corresponding download URL. For example:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"version": "0.7.13",
|
||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
||||
"arch": "aarch64",
|
||||
"platform": "apple-darwin",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.7.13/uv-aarch64-apple-darwin.tar.gz"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
You can supply a custom manifest file URL to define additional versions,
|
||||
architectures, or different download URLs.
|
||||
This is useful if you maintain your own uv builds or want to override the default sources.
|
||||
|
||||
```yaml
|
||||
- name: Use a custom manifest file
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
manifest-file: "https://example.com/my-custom-manifest.json"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> When you use a custom manifest file and do not set the `version` input, its default value is `latest`.
|
||||
> This means the action will install the latest version available in the custom manifest file.
|
||||
> This is different from the default behavior of installing the latest version from the official uv releases.
|
||||
|
||||
## Add problem matchers
|
||||
|
||||
This action automatically adds
|
||||
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md)
|
||||
for python errors.
|
||||
|
||||
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@v7
|
||||
with:
|
||||
add-problem-matchers: false
|
||||
```
|
||||
146
docs/environment-and-tools.md
Normal file
146
docs/environment-and-tools.md
Normal file
@@ -0,0 +1,146 @@
|
||||
# Environment and Tools
|
||||
|
||||
This document covers environment activation, tool directory configuration, and authentication options.
|
||||
|
||||
## Activate environment
|
||||
|
||||
You can set `activate-environment` to `true` to automatically activate a venv.
|
||||
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@v7
|
||||
with:
|
||||
activate-environment: true
|
||||
- run: uv pip install pip
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> Activating the environment adds your dependencies to the `PATH`, which could break some workflows.
|
||||
> For example, if you have a dependency which requires uv, e.g., `hatch`, activating the
|
||||
> environment will shadow the `uv` binary installed by this action and may result in a different uv
|
||||
> version being used.
|
||||
>
|
||||
> We do not recommend using this setting for most use-cases. Instead, use `uv run` to execute
|
||||
> commands in the environment.
|
||||
|
||||
## GitHub authentication token
|
||||
|
||||
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API
|
||||
rate limit too quickly, an authentication token can be provided via the `github-token` input. By
|
||||
default, the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
|
||||
|
||||
If the default
|
||||
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
|
||||
are not sufficient, you can provide a custom GitHub token with the necessary permissions.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom GitHub token
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
## UV_TOOL_DIR
|
||||
|
||||
On Windows `UV_TOOL_DIR` is set to `uv-tool-dir` in the `TMP` dir (e.g. `D:\a\_temp\uv-tool-dir`).
|
||||
On GitHub hosted runners this is on the much faster `D:` drive.
|
||||
|
||||
On all other platforms the tool environments are placed in the
|
||||
[default location](https://docs.astral.sh/uv/concepts/tools/#tools-directory).
|
||||
|
||||
If you want to change this behaviour (especially on self-hosted runners) you can use the `tool-dir`
|
||||
input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool dir
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
tool-dir: "/path/to/tool/dir"
|
||||
```
|
||||
|
||||
## UV_TOOL_BIN_DIR
|
||||
|
||||
On Windows `UV_TOOL_BIN_DIR` is set to `uv-tool-bin-dir` in the `TMP` dir (e.g.
|
||||
`D:\a\_temp\uv-tool-bin-dir`). On GitHub hosted runners this is on the much faster `D:` drive. This
|
||||
path is also automatically added to the PATH.
|
||||
|
||||
On all other platforms the tool binaries get installed to the
|
||||
[default location](https://docs.astral.sh/uv/concepts/tools/#the-bin-directory).
|
||||
|
||||
If you want to change this behaviour (especially on self-hosted runners) you can use the
|
||||
`tool-bin-dir` input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool bin dir
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
tool-bin-dir: "/path/to/tool-bin/dir"
|
||||
```
|
||||
|
||||
## Tilde Expansion
|
||||
|
||||
This action supports expanding the `~` character to the user's home directory for the following inputs:
|
||||
|
||||
- `version-file`
|
||||
- `cache-local-path`
|
||||
- `tool-dir`
|
||||
- `tool-bin-dir`
|
||||
- `cache-dependency-glob`
|
||||
|
||||
```yaml
|
||||
- name: Expand the tilde character
|
||||
uses: astral-sh/setup-uv@v7
|
||||
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"
|
||||
```
|
||||
|
||||
## Ignore empty workdir
|
||||
|
||||
By default, the action will warn if the workdir is empty, because this is usually the case when
|
||||
`actions/checkout` is configured to run after `setup-uv`, which is not supported.
|
||||
|
||||
If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore empty workdir
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
ignore-empty-workdir: true
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
This action sets several environment variables that influence uv's behavior and can be used by subsequent steps:
|
||||
|
||||
- `UV_PYTHON`: Set when `python-version` input is specified. Controls which Python version uv uses.
|
||||
- `UV_CACHE_DIR`: Set when caching is enabled (unless already configured in uv config files). Controls where uv stores its cache.
|
||||
- `UV_TOOL_DIR`: Set when `tool-dir` input is specified. Controls where uv installs tool environments.
|
||||
- `UV_TOOL_BIN_DIR`: Set when `tool-bin-dir` input is specified. Controls where uv installs tool binaries.
|
||||
- `UV_PYTHON_INSTALL_DIR`: Always set. Controls where uv installs Python versions.
|
||||
- `VIRTUAL_ENV`: Set when `activate-environment` is true. Points to the activated virtual environment.
|
||||
|
||||
**Environment variables that affect the action behavior:**
|
||||
|
||||
- `UV_NO_MODIFY_PATH`: If set, prevents the action from modifying PATH. Cannot be used with `activate-environment`.
|
||||
- `UV_CACHE_DIR`: If already set, the action will respect it instead of setting its own cache directory.
|
||||
|
||||
```yaml
|
||||
- name: Example using environment variables
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: "3.12"
|
||||
tool-dir: "/custom/tool/dir"
|
||||
enable-cache: true
|
||||
|
||||
- name: Check environment variables
|
||||
run: |
|
||||
echo "UV_PYTHON: $UV_PYTHON"
|
||||
echo "UV_CACHE_DIR: $UV_CACHE_DIR"
|
||||
echo "UV_TOOL_DIR: $UV_TOOL_DIR"
|
||||
echo "UV_PYTHON_INSTALL_DIR: $UV_PYTHON_INSTALL_DIR"
|
||||
```
|
||||
1613
package-lock.json
generated
1613
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -21,28 +21,28 @@
|
||||
"author": "@eifinger",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^4.0.5",
|
||||
"@actions/cache": "^4.1.0",
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/glob": "^0.5.0",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"@octokit/core": "^7.0.5",
|
||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
||||
"@octokit/plugin-paginate-rest": "^13.2.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^16.1.0",
|
||||
"@renovatebot/pep440": "^4.2.1",
|
||||
"smol-toml": "^1.4.2",
|
||||
"undici": "^7.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.2.4",
|
||||
"@biomejs/biome": "2.2.5",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^24.7.0",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"jest": "^30.1.3",
|
||||
"jest": "^30.2.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"ts-jest": "^29.4.4",
|
||||
"typescript": "^5.9.2"
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,77 @@
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||
"aarch64-apple-darwin-0.9.4":
|
||||
"52793821b13ac7e424f76c47f544b103a9bdd10546f165b327eba225d0ba4993",
|
||||
"aarch64-pc-windows-msvc-0.9.4":
|
||||
"cebd4cc1bfb1f9876903b528eb8d096dff701be9e1b0da04dab2f7151ec8ae11",
|
||||
"aarch64-unknown-linux-gnu-0.9.4":
|
||||
"c507e8cc4df18ed16533364013d93c2ace2c7f81a2a0d892a0dc833915b02e8b",
|
||||
"aarch64-unknown-linux-musl-0.9.4":
|
||||
"c66e99128739ff1ff34c1c883d4b85f72ba1b7ce1c192c07f8327f43172e8d06",
|
||||
"arm-unknown-linux-musleabihf-0.9.4":
|
||||
"25cfc8bf0f133c9f85f6627dc08d955e0ad80927e01b2e26c68de2470b6e38e6",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.4":
|
||||
"ebc126709a6ec2863ff22b0cae7ecd50b2094a88e269da674e382ddfb1da4881",
|
||||
"armv7-unknown-linux-musleabihf-0.9.4":
|
||||
"aa002dc4f272ceb02b5535c80a5b043a61b1d45c0234b4bdcae42096c0b25831",
|
||||
"i686-pc-windows-msvc-0.9.4":
|
||||
"c3bf7eb197164d3d63651412ff84185efc9c5b77509db120493dd84df6883ed4",
|
||||
"i686-unknown-linux-gnu-0.9.4":
|
||||
"df07db314f640d981fd057fdbb4d139248e79743d802137a0334de70952232da",
|
||||
"i686-unknown-linux-musl-0.9.4":
|
||||
"63fe6e880420411a5d8e42ea94ba8e21f503fd7c0b430c0cc0a7c4293f9d8ed3",
|
||||
"powerpc64-unknown-linux-gnu-0.9.4":
|
||||
"0b1526e807c7e3ce564b00db6b502ed6110f147e2db1eaf88f86c38fdf63af83",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.4":
|
||||
"eff46de91f1d7db051822c9f42e8e7ad06d8e77caa9fe8e9aa9d6e00bdc388af",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.4":
|
||||
"7d58c5bbbeb7417eb8e5bdc638e2c45ed7515190fe65e8407674d5efa2aab51c",
|
||||
"s390x-unknown-linux-gnu-0.9.4":
|
||||
"7936fdcd29e3dac647d2966643835c6c91fbae05afe0b67a400dea73df96cc86",
|
||||
"x86_64-apple-darwin-0.9.4":
|
||||
"b6a9682124666840031bde1f7a9ab6ca7389d918b4ee5f3d7e318ad574bb5936",
|
||||
"x86_64-pc-windows-msvc-0.9.4":
|
||||
"6529c0039c89754d5e2d19a8869694b2f6c7c5a27e89bfe44037fef8077dcc30",
|
||||
"x86_64-unknown-linux-gnu-0.9.4":
|
||||
"e02f7fc102d6a1ebfa3b260b788e9adf35802be28c8d85640e83246e61519c1e",
|
||||
"x86_64-unknown-linux-musl-0.9.4":
|
||||
"89c128a9bb7a0086cc35922401c20099337db84294c7997dd3df79b9f3157c45",
|
||||
"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":
|
||||
|
||||
@@ -4,6 +4,7 @@ import * as core from "@actions/core";
|
||||
import * as tc from "@actions/tool-cache";
|
||||
import type { Endpoints } from "@octokit/types";
|
||||
import * as pep440 from "@renovatebot/pep440";
|
||||
import * as semver from "semver";
|
||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||
import { Octokit } from "../utils/octokit";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
@@ -134,28 +135,31 @@ export async function resolveVersion(
|
||||
versionInput: string,
|
||||
manifestFile: string | undefined,
|
||||
githubToken: string,
|
||||
resolutionStrategy: "highest" | "lowest" = "highest",
|
||||
): Promise<string> {
|
||||
core.debug(`Resolving version: ${versionInput}`);
|
||||
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}`);
|
||||
}
|
||||
@@ -164,7 +168,10 @@ export async function resolveVersion(
|
||||
}
|
||||
const availableVersions = await getAvailableVersions(githubToken);
|
||||
core.debug(`Available versions: ${availableVersions}`);
|
||||
const resolvedVersion = maxSatisfying(availableVersions, version);
|
||||
const resolvedVersion =
|
||||
resolutionStrategy === "lowest"
|
||||
? minSatisfying(availableVersions, version)
|
||||
: maxSatisfying(availableVersions, version);
|
||||
if (resolvedVersion === undefined) {
|
||||
throw new Error(`No version found for ${version}`);
|
||||
}
|
||||
@@ -264,3 +271,24 @@ function maxSatisfying(
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function minSatisfying(
|
||||
versions: string[],
|
||||
version: string,
|
||||
): string | undefined {
|
||||
// For semver, we need to use a different approach since tc.evaluateVersions only returns max
|
||||
// Let's use semver directly for min satisfying
|
||||
const minSemver = semver.minSatisfying(versions, version);
|
||||
if (minSemver !== null) {
|
||||
core.debug(`Found a version that satisfies the semver range: ${minSemver}`);
|
||||
return minSemver;
|
||||
}
|
||||
const minPep440 = pep440.minSatisfying(versions, version);
|
||||
if (minPep440 !== null) {
|
||||
core.debug(
|
||||
`Found a version that satisfies the pep440 specifier: ${minPep440}`,
|
||||
);
|
||||
return minPep440;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
manifestFile,
|
||||
pythonDir,
|
||||
pythonVersion,
|
||||
resolutionStrategy,
|
||||
toolBinDir,
|
||||
toolDir,
|
||||
versionFile as versionFileInput,
|
||||
@@ -72,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",
|
||||
@@ -120,7 +121,12 @@ async function determineVersion(
|
||||
manifestFile: string | undefined,
|
||||
): Promise<string> {
|
||||
if (versionInput !== "") {
|
||||
return await resolveVersion(versionInput, manifestFile, githubToken);
|
||||
return await resolveVersion(
|
||||
versionInput,
|
||||
manifestFile,
|
||||
githubToken,
|
||||
resolutionStrategy,
|
||||
);
|
||||
}
|
||||
if (versionFileInput !== "") {
|
||||
const versionFromFile = getUvVersionFromFile(versionFileInput);
|
||||
@@ -129,7 +135,12 @@ async function determineVersion(
|
||||
`Could not determine uv version from file: ${versionFileInput}`,
|
||||
);
|
||||
}
|
||||
return await resolveVersion(versionFromFile, manifestFile, githubToken);
|
||||
return await resolveVersion(
|
||||
versionFromFile,
|
||||
manifestFile,
|
||||
githubToken,
|
||||
resolutionStrategy,
|
||||
);
|
||||
}
|
||||
const versionFromUvToml = getUvVersionFromFile(
|
||||
`${workingDirectory}${path.sep}uv.toml`,
|
||||
@@ -146,6 +157,7 @@ async function determineVersion(
|
||||
versionFromUvToml || versionFromPyproject || "latest",
|
||||
manifestFile,
|
||||
githubToken,
|
||||
resolutionStrategy,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ export const githubToken = core.getInput("github-token");
|
||||
export const manifestFile = getManifestFile();
|
||||
export const addProblemMatchers =
|
||||
core.getInput("add-problem-matchers") === "true";
|
||||
export const resolutionStrategy = getResolutionStrategy();
|
||||
|
||||
function getVersionFile(): string {
|
||||
const versionFileInput = core.getInput("version-file");
|
||||
@@ -186,3 +187,16 @@ function getManifestFile(): string | undefined {
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function getResolutionStrategy(): "highest" | "lowest" {
|
||||
const resolutionStrategyInput = core.getInput("resolution-strategy");
|
||||
if (resolutionStrategyInput === "lowest") {
|
||||
return "lowest";
|
||||
}
|
||||
if (resolutionStrategyInput === "highest" || resolutionStrategyInput === "") {
|
||||
return "highest";
|
||||
}
|
||||
throw new Error(
|
||||
`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,256 @@
|
||||
[
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-aarch64-apple-darwin.tar.gz",
|
||||
"platform": "apple-darwin",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-pc-windows-msvc.zip",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-aarch64-pc-windows-msvc.zip",
|
||||
"platform": "pc-windows-msvc",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-aarch64-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "aarch64",
|
||||
"artifactName": "uv-aarch64-unknown-linux-musl.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-aarch64-unknown-linux-musl.tar.gz",
|
||||
"platform": "unknown-linux-musl",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "arm",
|
||||
"artifactName": "uv-arm-unknown-linux-musleabihf.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-arm-unknown-linux-musleabihf.tar.gz",
|
||||
"platform": "unknown-linux-musleabihf",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "armv7",
|
||||
"artifactName": "uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
||||
"platform": "unknown-linux-gnueabihf",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "armv7",
|
||||
"artifactName": "uv-armv7-unknown-linux-musleabihf.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-armv7-unknown-linux-musleabihf.tar.gz",
|
||||
"platform": "unknown-linux-musleabihf",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "i686",
|
||||
"artifactName": "uv-i686-pc-windows-msvc.zip",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-i686-pc-windows-msvc.zip",
|
||||
"platform": "pc-windows-msvc",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "i686",
|
||||
"artifactName": "uv-i686-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-i686-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "i686",
|
||||
"artifactName": "uv-i686-unknown-linux-musl.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-i686-unknown-linux-musl.tar.gz",
|
||||
"platform": "unknown-linux-musl",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "powerpc64",
|
||||
"artifactName": "uv-powerpc64-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-powerpc64-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "powerpc64le",
|
||||
"artifactName": "uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "riscv64gc",
|
||||
"artifactName": "uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "s390x",
|
||||
"artifactName": "uv-s390x-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-s390x-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-apple-darwin.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-x86_64-apple-darwin.tar.gz",
|
||||
"platform": "apple-darwin",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-pc-windows-msvc.zip",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-x86_64-pc-windows-msvc.zip",
|
||||
"platform": "pc-windows-msvc",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-unknown-linux-musl.tar.gz",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.9.4/uv-x86_64-unknown-linux-musl.tar.gz",
|
||||
"platform": "unknown-linux-musl",
|
||||
"version": "0.9.4"
|
||||
},
|
||||
{
|
||||
"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