mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-12-19 11:04:08 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d70817ce85 | ||
|
|
49df72dfcf | ||
|
|
89ebbb66d2 |
2
.github/workflows/test-windows.yml
vendored
2
.github/workflows/test-windows.yml
vendored
@@ -23,7 +23,5 @@ jobs:
|
|||||||
}
|
}
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__\fixtures\uv-project
|
working-directory: __tests__\fixtures\uv-project
|
||||||
|
|||||||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -30,8 +30,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install default version
|
- name: Install default version
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__/fixtures/uv-project
|
working-directory: __tests__/fixtures/uv-project
|
||||||
test-specific-version:
|
test-specific-version:
|
||||||
@@ -46,7 +44,6 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.uv-version }}
|
version: ${{ matrix.uv-version }}
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__/fixtures/uv-project
|
working-directory: __tests__/fixtures/uv-project
|
||||||
test-checksum:
|
test-checksum:
|
||||||
@@ -69,13 +66,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: "0.3.2"
|
version: "0.3.2"
|
||||||
checksum: ${{ matrix.checksum }}
|
checksum: ${{ matrix.checksum }}
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
test-with-explicit-token:
|
||||||
test-without-github-token:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install default version
|
- name: Install default version
|
||||||
uses: ./
|
uses: ./
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- run: uv sync
|
- run: uv sync
|
||||||
working-directory: __tests__/fixtures/uv-project
|
working-directory: __tests__/fixtures/uv-project
|
||||||
test-uvx:
|
test-uvx:
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -17,7 +17,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
|||||||
- [Enable Caching](#enable-caching)
|
- [Enable Caching](#enable-caching)
|
||||||
- [Local cache path](#local-cache-path)
|
- [Local cache path](#local-cache-path)
|
||||||
- [Cache dependency glob](#cache-dependency-glob)
|
- [Cache dependency glob](#cache-dependency-glob)
|
||||||
- [API rate limit](#api-rate-limit)
|
- [GitHub authentication token](#github-authentication-token)
|
||||||
- [How it works](#how-it-works)
|
- [How it works](#how-it-works)
|
||||||
- [FAQ](#faq)
|
- [FAQ](#faq)
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ changes. The glob matches files relative to the repository root.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Define a list of cache dependency globs
|
- name: Define a list of cache dependency globs
|
||||||
uses: astral-sh/setup-uv@v1
|
uses: astral-sh/setup-uv@v2
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: |
|
cache-dependency-glob: |
|
||||||
@@ -135,16 +135,21 @@ changes. The glob matches files relative to the repository root.
|
|||||||
'**pyproject.toml'
|
'**pyproject.toml'
|
||||||
```
|
```
|
||||||
|
|
||||||
### API rate limit
|
### GitHub authentication token
|
||||||
|
|
||||||
To avoid hitting the `API rate limit exceeded` error, supply a GitHub token via the `github-token`
|
This action uses the GitHub API to fetch the `uv` release artifacts. To avoid hitting the GitHub API
|
||||||
input.
|
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
|
```yaml
|
||||||
- name: Install uv and supply a GitHub token
|
- name: Install the latest version of uv with a custom GitHub token
|
||||||
uses: astral-sh/setup-uv@v2
|
uses: astral-sh/setup-uv@v2
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ inputs:
|
|||||||
"Used to increase the rate limit when retrieving versions and downloading
|
"Used to increase the rate limit when retrieving versions and downloading
|
||||||
uv."
|
uv."
|
||||||
required: false
|
required: false
|
||||||
|
default: ${{ github.token }}
|
||||||
enable-cache:
|
enable-cache:
|
||||||
description: "Enable caching of the uv cache"
|
description: "Enable caching of the uv cache"
|
||||||
default: "false"
|
default: "false"
|
||||||
|
|||||||
36
dist/setup/index.js
generated
vendored
36
dist/setup/index.js
generated
vendored
@@ -83881,6 +83881,42 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||||||
exports.KNOWN_CHECKSUMS = void 0;
|
exports.KNOWN_CHECKSUMS = void 0;
|
||||||
// AUTOGENERATED_DO_NOT_EDIT
|
// AUTOGENERATED_DO_NOT_EDIT
|
||||||
exports.KNOWN_CHECKSUMS = {
|
exports.KNOWN_CHECKSUMS = {
|
||||||
|
"undefined-0.4.9": "a5ca243a43868c5eb259bc80d83d5fa32ba33dea6534a1e96683535bfb0011f8",
|
||||||
|
"aarch64-apple-darwin-0.4.9": "049466d3f7f86262f5915b57cc037b2c814634fa4733ba2bd9062b72c4264482",
|
||||||
|
"aarch64-unknown-linux-gnu-0.4.9": "7f8eb20c003bc789136d80ad4dd9f1b2875d30e41ed085197eada9e3ad0fdda6",
|
||||||
|
"aarch64-unknown-linux-musl-0.4.9": "82c9ac934f587a36910b47f11b430472280e6a0d28d3f3ba126aaa6fee3b9767",
|
||||||
|
"arm-unknown-linux-musleabihf-0.4.9": "06546daa31d52d4ff9ff5589d1549c18988758f583912a5bba65d27e57c5f89b",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.4.9": "08a5f64077331759b1a7c05b632645b56a9e8a42f54485a23d6b49f3f5dcdf6b",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.4.9": "b5e497e71693a6eff6c5ceacaadce0979a0b7a08f18882b38f774c79de436c34",
|
||||||
|
"i686-pc-windows-msvc-0.4.9": "e24eecd74d1ee3955fc3d14a99769766ffe4933eb51622d1db12fa0bddd2e122",
|
||||||
|
"i686-unknown-linux-gnu-0.4.9": "64a539c0cddedd3b5c75290f687e37824a573032f3de4bf3382942b3bc6cc357",
|
||||||
|
"i686-unknown-linux-musl-0.4.9": "f21072c59cfe898837533369eae8952954ee1c18d4bd52a5ed0fa5ee72017820",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.4.9": "d02d6427583ab1007e5b52580322cf3bd0434e49d4683819230f59adfda1c343",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.4.9": "bda93bd35f1651a7d15c4367b5d35a0ffa88f6c7e527d0bd89324210c23761aa",
|
||||||
|
"powerpc64le-unknown-linux-musl-0.4.9": "018503cda7e80d1b0d158800670ef42dd9b819c74102d5ccb91167012552158a",
|
||||||
|
"s390x-unknown-linux-gnu-0.4.9": "f35cda4c013a15c833f170c28761fbdf1e244c3ad56b2a1c1516ac09362cc751",
|
||||||
|
"x86_64-apple-darwin-0.4.9": "71b5ec02380a413a9ab65f6f5e2433a73aaee95834dbc3c6c451492268471f35",
|
||||||
|
"x86_64-pc-windows-msvc-0.4.9": "5d082ee82624e51f3c8c994329277168f427732d46ab59cfbb974bdd83f6fea2",
|
||||||
|
"x86_64-unknown-linux-gnu-0.4.9": "4d78a50027f9195db60905b2f50422f417a0aed287f6f94b205e86fecbdb5464",
|
||||||
|
"x86_64-unknown-linux-musl-0.4.9": "43a2aacf680cba78f1730bc363995f7d3b27fd10ae77a70cd35f5e30e9c1418c",
|
||||||
|
"undefined-0.4.8": "b4a05405382a2017cae922ff1c3636b4d799673ae90162739614101936f1d3ca",
|
||||||
|
"aarch64-apple-darwin-0.4.8": "3184e9db9191ca2665feaa72b4b9ed1958feafde81da9573a1320bff6a6a8767",
|
||||||
|
"aarch64-unknown-linux-gnu-0.4.8": "72439cb8e248f609e541de90988375a9ca42bb1f4afa9be14b333970acab4c9f",
|
||||||
|
"aarch64-unknown-linux-musl-0.4.8": "f4f0740dc1ede0ae49a6f8affc6b1e966b4759877db5add0317090303961d23b",
|
||||||
|
"arm-unknown-linux-musleabihf-0.4.8": "26bfc468f9a30ce76577ecf0bc10298f66f04f8893ceda3ab569d9ba18ce899c",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.4.8": "7798c99ca955b272ac534d355b31d6992f1c608c81bf5b106a149144ea39258b",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.4.8": "ceb1d908b5cb5a68c848631175c03f5f3960d08ef6f796daabd79f988d153f38",
|
||||||
|
"i686-pc-windows-msvc-0.4.8": "1e5fbb0a8677da15ec3f5c46a4c84433071533ffe539c2fe2071c8c20e27b420",
|
||||||
|
"i686-unknown-linux-gnu-0.4.8": "535d7b0a09a63e7348b1df1f07806eaca4c080ae4f03605a32fd9177babafa95",
|
||||||
|
"i686-unknown-linux-musl-0.4.8": "83c901abf25eab073d310c4a3ec04a2bedbd31a7d4079f6b329c250e85ab9376",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.4.8": "2329e55a246e92973175ff9a7276e155b873e566cf0a584c76ff24f1d2eaa28e",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.4.8": "0a19a35c20351d08869e25be8d9913fddc696a9d8effc2f790def7fcf6a4114b",
|
||||||
|
"powerpc64le-unknown-linux-musl-0.4.8": "0ba79511f67ba1335321cd31ab8b6ed84ed65ad1be4d39406b245b40f2f7a61e",
|
||||||
|
"s390x-unknown-linux-gnu-0.4.8": "7c0a52c4d2c02ad3046b792985f50a55869b73fa4e38b0bc51ab04479a2cc41a",
|
||||||
|
"x86_64-apple-darwin-0.4.8": "95f94045898d34e552f43fd65b5a1824cf86873a64e35866a06689dd5de266b2",
|
||||||
|
"x86_64-pc-windows-msvc-0.4.8": "0bbb4fd2d8b7a850a295a0f1fb87a77992c85f59d223d964004e36243b6c803f",
|
||||||
|
"x86_64-unknown-linux-gnu-0.4.8": "3c2e233746eba77b490024f386d1d20fa09b11717365c8ddd69043729fb71ab2",
|
||||||
|
"x86_64-unknown-linux-musl-0.4.8": "5b07df5d9228fb09c31dd1b08e2582ca8df6765705c0fb550b9eb87950d3ca1e",
|
||||||
"undefined-0.4.7": "2243b3636da44419b6d15df30db138f861a3c36991e9b9eb8ec43146c674df10",
|
"undefined-0.4.7": "2243b3636da44419b6d15df30db138f861a3c36991e9b9eb8ec43146c674df10",
|
||||||
"aarch64-apple-darwin-0.4.7": "a1fa60ccd00d9702e6d2792810226ce2c17d43807f38ab70c7418763693a3f7e",
|
"aarch64-apple-darwin-0.4.7": "a1fa60ccd00d9702e6d2792810226ce2c17d43807f38ab70c7418763693a3f7e",
|
||||||
"aarch64-unknown-linux-gnu-0.4.7": "b54ab2370cb726d40896e9e9b71ee08bb93aec656a80413515214699b64eb458",
|
"aarch64-unknown-linux-gnu-0.4.7": "b54ab2370cb726d40896e9e9b71ee08bb93aec656a80413515214699b64eb458",
|
||||||
|
|||||||
@@ -1,5 +1,77 @@
|
|||||||
// AUTOGENERATED_DO_NOT_EDIT
|
// AUTOGENERATED_DO_NOT_EDIT
|
||||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||||
|
"undefined-0.4.9":
|
||||||
|
"a5ca243a43868c5eb259bc80d83d5fa32ba33dea6534a1e96683535bfb0011f8",
|
||||||
|
"aarch64-apple-darwin-0.4.9":
|
||||||
|
"049466d3f7f86262f5915b57cc037b2c814634fa4733ba2bd9062b72c4264482",
|
||||||
|
"aarch64-unknown-linux-gnu-0.4.9":
|
||||||
|
"7f8eb20c003bc789136d80ad4dd9f1b2875d30e41ed085197eada9e3ad0fdda6",
|
||||||
|
"aarch64-unknown-linux-musl-0.4.9":
|
||||||
|
"82c9ac934f587a36910b47f11b430472280e6a0d28d3f3ba126aaa6fee3b9767",
|
||||||
|
"arm-unknown-linux-musleabihf-0.4.9":
|
||||||
|
"06546daa31d52d4ff9ff5589d1549c18988758f583912a5bba65d27e57c5f89b",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.4.9":
|
||||||
|
"08a5f64077331759b1a7c05b632645b56a9e8a42f54485a23d6b49f3f5dcdf6b",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.4.9":
|
||||||
|
"b5e497e71693a6eff6c5ceacaadce0979a0b7a08f18882b38f774c79de436c34",
|
||||||
|
"i686-pc-windows-msvc-0.4.9":
|
||||||
|
"e24eecd74d1ee3955fc3d14a99769766ffe4933eb51622d1db12fa0bddd2e122",
|
||||||
|
"i686-unknown-linux-gnu-0.4.9":
|
||||||
|
"64a539c0cddedd3b5c75290f687e37824a573032f3de4bf3382942b3bc6cc357",
|
||||||
|
"i686-unknown-linux-musl-0.4.9":
|
||||||
|
"f21072c59cfe898837533369eae8952954ee1c18d4bd52a5ed0fa5ee72017820",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.4.9":
|
||||||
|
"d02d6427583ab1007e5b52580322cf3bd0434e49d4683819230f59adfda1c343",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.4.9":
|
||||||
|
"bda93bd35f1651a7d15c4367b5d35a0ffa88f6c7e527d0bd89324210c23761aa",
|
||||||
|
"powerpc64le-unknown-linux-musl-0.4.9":
|
||||||
|
"018503cda7e80d1b0d158800670ef42dd9b819c74102d5ccb91167012552158a",
|
||||||
|
"s390x-unknown-linux-gnu-0.4.9":
|
||||||
|
"f35cda4c013a15c833f170c28761fbdf1e244c3ad56b2a1c1516ac09362cc751",
|
||||||
|
"x86_64-apple-darwin-0.4.9":
|
||||||
|
"71b5ec02380a413a9ab65f6f5e2433a73aaee95834dbc3c6c451492268471f35",
|
||||||
|
"x86_64-pc-windows-msvc-0.4.9":
|
||||||
|
"5d082ee82624e51f3c8c994329277168f427732d46ab59cfbb974bdd83f6fea2",
|
||||||
|
"x86_64-unknown-linux-gnu-0.4.9":
|
||||||
|
"4d78a50027f9195db60905b2f50422f417a0aed287f6f94b205e86fecbdb5464",
|
||||||
|
"x86_64-unknown-linux-musl-0.4.9":
|
||||||
|
"43a2aacf680cba78f1730bc363995f7d3b27fd10ae77a70cd35f5e30e9c1418c",
|
||||||
|
"undefined-0.4.8":
|
||||||
|
"b4a05405382a2017cae922ff1c3636b4d799673ae90162739614101936f1d3ca",
|
||||||
|
"aarch64-apple-darwin-0.4.8":
|
||||||
|
"3184e9db9191ca2665feaa72b4b9ed1958feafde81da9573a1320bff6a6a8767",
|
||||||
|
"aarch64-unknown-linux-gnu-0.4.8":
|
||||||
|
"72439cb8e248f609e541de90988375a9ca42bb1f4afa9be14b333970acab4c9f",
|
||||||
|
"aarch64-unknown-linux-musl-0.4.8":
|
||||||
|
"f4f0740dc1ede0ae49a6f8affc6b1e966b4759877db5add0317090303961d23b",
|
||||||
|
"arm-unknown-linux-musleabihf-0.4.8":
|
||||||
|
"26bfc468f9a30ce76577ecf0bc10298f66f04f8893ceda3ab569d9ba18ce899c",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.4.8":
|
||||||
|
"7798c99ca955b272ac534d355b31d6992f1c608c81bf5b106a149144ea39258b",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.4.8":
|
||||||
|
"ceb1d908b5cb5a68c848631175c03f5f3960d08ef6f796daabd79f988d153f38",
|
||||||
|
"i686-pc-windows-msvc-0.4.8":
|
||||||
|
"1e5fbb0a8677da15ec3f5c46a4c84433071533ffe539c2fe2071c8c20e27b420",
|
||||||
|
"i686-unknown-linux-gnu-0.4.8":
|
||||||
|
"535d7b0a09a63e7348b1df1f07806eaca4c080ae4f03605a32fd9177babafa95",
|
||||||
|
"i686-unknown-linux-musl-0.4.8":
|
||||||
|
"83c901abf25eab073d310c4a3ec04a2bedbd31a7d4079f6b329c250e85ab9376",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.4.8":
|
||||||
|
"2329e55a246e92973175ff9a7276e155b873e566cf0a584c76ff24f1d2eaa28e",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.4.8":
|
||||||
|
"0a19a35c20351d08869e25be8d9913fddc696a9d8effc2f790def7fcf6a4114b",
|
||||||
|
"powerpc64le-unknown-linux-musl-0.4.8":
|
||||||
|
"0ba79511f67ba1335321cd31ab8b6ed84ed65ad1be4d39406b245b40f2f7a61e",
|
||||||
|
"s390x-unknown-linux-gnu-0.4.8":
|
||||||
|
"7c0a52c4d2c02ad3046b792985f50a55869b73fa4e38b0bc51ab04479a2cc41a",
|
||||||
|
"x86_64-apple-darwin-0.4.8":
|
||||||
|
"95f94045898d34e552f43fd65b5a1824cf86873a64e35866a06689dd5de266b2",
|
||||||
|
"x86_64-pc-windows-msvc-0.4.8":
|
||||||
|
"0bbb4fd2d8b7a850a295a0f1fb87a77992c85f59d223d964004e36243b6c803f",
|
||||||
|
"x86_64-unknown-linux-gnu-0.4.8":
|
||||||
|
"3c2e233746eba77b490024f386d1d20fa09b11717365c8ddd69043729fb71ab2",
|
||||||
|
"x86_64-unknown-linux-musl-0.4.8":
|
||||||
|
"5b07df5d9228fb09c31dd1b08e2582ca8df6765705c0fb550b9eb87950d3ca1e",
|
||||||
"undefined-0.4.7":
|
"undefined-0.4.7":
|
||||||
"2243b3636da44419b6d15df30db138f861a3c36991e9b9eb8ec43146c674df10",
|
"2243b3636da44419b6d15df30db138f861a3c36991e9b9eb8ec43146c674df10",
|
||||||
"aarch64-apple-darwin-0.4.7":
|
"aarch64-apple-darwin-0.4.7":
|
||||||
|
|||||||
Reference in New Issue
Block a user