mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-03-20 01:27:30 +00:00
This PR tries fetching the uv artifact from `releases.astral.sh` by default, only in cases where the artifact would otherwise have come from `https://github.com/astral-sh/uv/releases/download/`. The checksums are supposed to be the same for the mirror, and can still come from `raw.githubusercontent.com/astral-sh/versions`. If the download fails, we fall back to the original URL. This avoids hitting GitHub's Releases API which is prone to rate limiting. As far as I can tell, together with https://github.com/astral-sh/setup-uv/pull/802 this PR makes a github token entirely unnecessary for this action. Towards https://github.com/astral-sh/uv/issues/18503.
14 lines
557 B
TypeScript
14 lines
557 B
TypeScript
export const TOOL_CACHE_NAME = "uv";
|
|
export const STATE_UV_PATH = "uv-path";
|
|
export const STATE_UV_VERSION = "uv-version";
|
|
export const VERSIONS_NDJSON_URL =
|
|
"https://raw.githubusercontent.com/astral-sh/versions/main/v1/uv.ndjson";
|
|
|
|
/** GitHub Releases URL prefix for uv artifacts. */
|
|
export const GITHUB_RELEASES_PREFIX =
|
|
"https://github.com/astral-sh/uv/releases/download/";
|
|
|
|
/** Astral mirror URL prefix that fronts GitHub Releases for uv artifacts. */
|
|
export const ASTRAL_MIRROR_PREFIX =
|
|
"https://releases.astral.sh/github/uv/releases/download/";
|