5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2025-12-15 11:07:14 +00:00

Compare commits

...

25 Commits

Author SHA1 Message Date
Kevin Stillhammer
b5f58b2abc Support toml spec 1.0.0 (#245)
iarna/toml is unmaintained.
Replaced by smol-toml which is maintained and has the same api

Fixes: #242
2025-01-16 16:38:18 +01:00
Kevin Stillhammer
4e3dbecc19 Add venv/bin as absolute path to PATH (#241)
Fixes: #239
2025-01-16 09:14:32 +00:00
dependabot[bot]
2487ffc9aa Bump @octokit/rest from 21.0.2 to 21.1.0 (#229)
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 21.0.2 to
21.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/octokit/rest.js/releases"><code>@​octokit/rest</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v21.1.0</h2>
<h1><a
href="https://github.com/octokit/rest.js/compare/v21.0.2...v21.1.0">21.1.0</a>
(2025-01-08)</h1>
<h3>Features</h3>
<ul>
<li>new endpoints, bump Octokit deps to fix Deno (<a
href="https://redirect.github.com/octokit/rest.js/issues/477">#477</a>)
(<a
href="908b1c8fdd">908b1c8</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="908b1c8fdd"><code>908b1c8</code></a>
feat: new endpoints, bump Octokit deps to fix Deno (<a
href="https://redirect.github.com/octokit/rest.js/issues/477">#477</a>)</li>
<li><a
href="751b522be0"><code>751b522</code></a>
chore(deps): update dependency fetch-mock to v12 (<a
href="https://redirect.github.com/octokit/rest.js/issues/470">#470</a>)</li>
<li><a
href="5ad12fda8c"><code>5ad12fd</code></a>
chore(deps): update dependency <code>@​types/node</code> to v22 (<a
href="https://redirect.github.com/octokit/rest.js/issues/472">#472</a>)</li>
<li><a
href="c88980a823"><code>c88980a</code></a>
ci(action): update actions/checkout digest to 11bd719 (<a
href="https://redirect.github.com/octokit/rest.js/issues/469">#469</a>)</li>
<li><a
href="94443df1a6"><code>94443df</code></a>
ci(action): update actions/checkout digest to eef6144 (<a
href="https://redirect.github.com/octokit/rest.js/issues/467">#467</a>)</li>
<li><a
href="c59fcf6c2f"><code>c59fcf6</code></a>
chore(deps): update dependency <code>@​octokit/tsconfig</code> to v4 (<a
href="https://redirect.github.com/octokit/rest.js/issues/464">#464</a>)</li>
<li><a
href="2f97e4c94d"><code>2f97e4c</code></a>
build(deps): Bump body-parser and express (<a
href="https://redirect.github.com/octokit/rest.js/issues/465">#465</a>)</li>
<li><a
href="2dec6cc313"><code>2dec6cc</code></a>
chore(deps): update dependency esbuild to ^0.24.0 (<a
href="https://redirect.github.com/octokit/rest.js/issues/463">#463</a>)</li>
<li>See full diff in <a
href="https://github.com/octokit/rest.js/compare/v21.0.2...v21.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@octokit/rest&package-manager=npm_and_yarn&previous-version=21.0.2&new-version=21.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 10:01:25 +01:00
github-actions[bot]
118b7214ec chore: update known checksums for 0.5.20 (#238)
chore: update known checksums for 0.5.20

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-16 08:10:23 +00:00
github-actions[bot]
d942048030 chore: update known checksums for 0.5.19 (#237)
chore: update known checksums for 0.5.19

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-16 06:50:10 +00:00
dependabot[bot]
77cc1aee22 Bump typescript from 5.7.2 to 5.7.3 (#230)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2
to 5.7.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/TypeScript/releases">typescript's
releases</a>.</em></p>
<blockquote>
<h2>TypeScript 5.7.3</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/">release
announcement</a>.</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.0 (Beta)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.1%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.1 (RC)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.2%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.2 (Stable)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.2%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.3 (Stable)</a>.</li>
</ul>
<p>Downloads are available on <a
href="https://www.npmjs.com/package/typescript">npm</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a5e123d9e0"><code>a5e123d</code></a>
Update LKG</li>
<li><a
href="8bc02048a2"><code>8bc0204</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60828">#60828</a>
(Fix CodeQL configuration, releases) into release-5.7 (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60923">#60923</a>)</li>
<li><a
href="7aa63df74c"><code>7aa63df</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60393">#60393</a>
(Don't try to add an implicit undefi...) into release-5.7 (#...</li>
<li><a
href="9df7c36aa9"><code>9df7c36</code></a>
Bump version to 5.7.3 and LKG</li>
<li><a
href="e167412fe0"><code>e167412</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60794">#60794</a>
(Harden <code>sanitizeLog</code> against incorr...) into release-5.7
(#...</li>
<li><a
href="9ba364c55a"><code>9ba364c</code></a>
Fix coverage build on release-5.7 (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60792">#60792</a>)</li>
<li><a
href="4b7441a8be"><code>4b7441a</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60680">#60680</a>
(Mark the inherited any-based index ...) into release-5.7 (#...</li>
<li><a
href="e844dc305e"><code>e844dc3</code></a>
Cherry-pick <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60402">#60402</a>,
<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60440">#60440</a>,
<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60616">#60616</a>
into release-5.7 (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60777">#60777</a>)</li>
<li><a
href="21b02a1e1f"><code>21b02a1</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60749">#60749</a>
(Do not require import attribute on ...) into release-5.7 (#...</li>
<li><a
href="b82fd16484"><code>b82fd16</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60576">#60576</a>
(Avoid incorrectly reusing assertion...) into release-5.7 (#...</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typescript&package-manager=npm_and_yarn&previous-version=5.7.2&new-version=5.7.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-15 17:00:44 +01:00
dependabot[bot]
169ed2a5f2 Bump @types/node from 22.10.5 to 22.10.6 (#236)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.10.5 to 22.10.6.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=22.10.5&new-version=22.10.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 15:22:26 +01:00
Kevin Stillhammer
9fffe05b88 Add documentation for new inputs uv-file and pyproject-file (#235) 2025-01-13 14:32:41 +00:00
Kevin Stillhammer
5ce9ee0011 Detect required-version from config file (#233)
1. If defined use version input
2. If defined use uv-file input
3. If defined use pyproject-file input
4. Search for required-version in uv.toml in repo root
5. Search for required-version in pyproject.toml in repo root
6. Use latest

Closes: #215
2025-01-13 15:24:25 +01:00
github-actions[bot]
d577e74f98 chore: update known checksums for 0.5.18 (#232)
chore: update known checksums for 0.5.18

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-11 15:28:58 +00:00
github-actions[bot]
7174288630 chore: update known checksums for 0.5.17 (#231)
chore: update known checksums for 0.5.17

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-10 22:28:45 +00:00
github-actions[bot]
94a861f4b5 chore: update known checksums for 0.5.16 (#228)
chore: update known checksums for 0.5.16

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-08 17:22:28 +00:00
dependabot[bot]
e9f61537d9 Bump @types/node from 22.10.3 to 22.10.5 (#223)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.10.3 to 22.10.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=22.10.3&new-version=22.10.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 17:47:23 +01:00
github-actions[bot]
4cd05096c3 chore: update known checksums for 0.5.15 (#225)
chore: update known checksums for 0.5.15

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-07 07:36:35 +00:00
samypr100
7768fe6bf0 fix: make sure VIRTUAL_ENV is an absolute path (#224)
Closes https://github.com/astral-sh/setup-uv/issues/219
2025-01-06 17:34:15 -05:00
github-actions[bot]
7b290f7b85 chore: update known checksums for 0.5.14 (#222)
chore: update known checksums for 0.5.14

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-03 07:52:49 +00:00
dependabot[bot]
949720bc7f Bump @types/node from 22.10.2 to 22.10.3 (#220)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.10.2 to 22.10.3.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=22.10.2&new-version=22.10.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 12:57:08 +01:00
dependabot[bot]
d837751086 Bump peter-evans/create-pull-request from 7.0.5 to 7.0.6 (#218) 2024-12-30 10:33:07 -05:00
github-actions[bot]
9869cbc19a chore: update known checksums for 0.5.12 (#214)
chore: update known checksums for 0.5.12

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-12-26 21:13:31 +00:00
Jinzhe Zeng
03fe035094 docs: bump astral-sh/setup-uv to v5 (#205) 2024-12-23 22:16:27 +01:00
Kevin Stillhammer
887a942a15 Set VIRTUAL_ENV to .venv instead of .venv/bin (#210)
Closes: #209
2024-12-23 17:45:21 +01:00
Kevin Stillhammer
d174a24c07 Align use of actions/setup-python with uv docu (#207)
Closes: #197
2024-12-22 11:13:40 +00:00
Kevin Stillhammer
12c852e6ba Remove uv version from cache key (#206)
This approach was copied from setup-rye but uv now has the capability to
determine if a cache version is compatible. By removing it we will less
frequently invalidate the cache and thus save bandwidth

Closes: #203
2024-12-22 12:12:29 +01:00
Kevin Stillhammer
180f8b4439 Fix wrong cacheDependencyPathHash (#201)
Introduced in https://github.com/astral-sh/setup-uv/pull/200 and not
caught because the test is not needed for automerge to pass
2024-12-20 11:42:38 +01:00
Kevin Stillhammer
e3fb95a689 Warn instead of fail for no-dependency-glob (#200)
Closes: #199
2024-12-20 10:32:52 +00:00
24 changed files with 2357 additions and 738 deletions

View File

@@ -64,6 +64,39 @@ jobs:
fi
env:
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
test-pyproject-file-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install version 0.5.14
id: setup-uv
uses: ./
with:
pyproject-file: "__tests__/fixtures/pyproject-toml-project/pyproject.toml"
- name: Correct version gets installed
run: |
if [ "$UV_VERSION" != "0.5.14" ]; then
exit 1
fi
env:
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
test-uv-file-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install version 0.5.15
id: setup-uv
uses: ./
with:
pyproject-file: "__tests__/fixtures/uv-toml-project/pyproject.toml"
uv-file: "__tests__/fixtures/uv-toml-project/uv.toml"
- name: Correct version gets installed
run: |
if [ "$UV_VERSION" != "0.5.15" ]; then
exit 1
fi
env:
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
test-checksum:
runs-on: ${{ matrix.os }}
strategy:

View File

@@ -17,7 +17,7 @@ jobs:
src/download/checksum/known-checksums.ts ${{ secrets.GITHUB_TOKEN }}
- run: npm install && npm run all
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
with:
commit-message: "chore: update known checksums"
title:

View File

@@ -30,23 +30,33 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
## Usage
### Install the latest version (default)
### Install a required-version or latest (default)
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
uses: astral-sh/setup-uv@v5
```
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
in a `uv.toml` or `pyproject.toml` file in the repository root. If none is found, the latest version will be installed.
For an example workflow, see
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
### Install the latest version
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
```
### Install a specific version
```yaml
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: "0.4.4"
```
@@ -58,18 +68,37 @@ to install the latest version that satisfies the range.
```yaml
- name: Install a semver range of uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ">=0.4.0"
```
```yaml
- name: Pinning a minor version of uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: "0.4.x"
```
### Install a required-version
You can specify a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
in either a `uv.toml` or `pyproject.toml` file:
```yaml
- name: Install required-version defined in uv.toml
uses: astral-sh/setup-uv@v5
with:
uv-file: "path/to/uv.toml"
```
```yaml
- name: Install required-version defined in pyproject.toml
uses: astral-sh/setup-uv@v5
with:
pyproject-file: "path/to/pyproject.toml"
```
### Python version
You can use the input `python-version` to
@@ -82,7 +111,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@v4
uses: astral-sh/setup-uv@v5
with:
python-version: 3.13t
- run: uv pip install --python=3.13t pip
@@ -100,7 +129,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Test with python ${{ matrix.python-version }}
@@ -115,7 +144,7 @@ are automatically verified by this action. The sha256 hashes can be found on the
```yaml
- name: Install a specific version and validate the checksum
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: "0.3.1"
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
@@ -136,7 +165,7 @@ You can optionally define a custom cache key suffix.
```yaml
- name: Enable caching and define a custom cache key suffix
id: setup-uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-suffix: "optional-suffix"
@@ -168,7 +197,7 @@ changes. If you use relative paths, they are relative to the repository root.
```yaml
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
@@ -176,7 +205,7 @@ changes. If you use relative paths, they are relative to the repository root.
```yaml
- name: Define a list of cache dependency globs
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: |
@@ -186,7 +215,7 @@ changes. If you use relative paths, they are relative to the repository root.
```yaml
- name: Define an absolute cache dependency glob
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
@@ -194,7 +223,7 @@ changes. If you use relative paths, they are relative to the repository root.
```yaml
- name: Never invalidate the cache
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: ""
@@ -209,7 +238,7 @@ It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\uv-tool-dir` on Wi
```yaml
- name: Define a custom uv cache path
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
cache-local-path: "/path/to/cache"
```
@@ -228,7 +257,7 @@ input.
```yaml
- name: Don't prune the cache before saving it
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
prune-cache: false
@@ -241,7 +270,7 @@ If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
```yaml
- name: Ignore nothing to cache
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
ignore-nothing-to-cache: true
@@ -259,7 +288,7 @@ are not sufficient, you can provide a custom GitHub token with the necessary per
```yaml
- name: Install the latest version of uv with a custom GitHub token
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```
@@ -277,7 +306,7 @@ input:
```yaml
- name: Install the latest version of uv with a custom tool dir
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
tool-dir: "/path/to/tool/dir"
```
@@ -296,7 +325,7 @@ If you want to change this behaviour (especially on self-hosted runners) you can
```yaml
- name: Install the latest version of uv with a custom tool bin dir
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
tool-bin-dir: "/path/to/tool-bin/dir"
```
@@ -312,7 +341,7 @@ This action supports expanding the `~` character to the user's home directory fo
```yaml
- name: Expand the tilde character
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
cache-local-path: "~/path/to/cache"
tool-dir: "~/path/to/tool/dir"
@@ -334,21 +363,22 @@ by name (`uv`).
### Do I still need `actions/setup-python` alongside `setup-uv`?
No. This action is modelled as a drop-in replacement for `actions/setup-python` when using uv. With
`setup-uv`, you can install a specific version of Python using `uv python install` rather than
With `setup-uv`, you can install a specific version of Python using `uv python install` rather than
relying on `actions/setup-python`.
Using `actions/setup-python` can be faster, because GitHub caches the Python versions alongside the runner.
For example:
```yaml
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Test
run: uv run --frozen pytest
run: uv run --frozen pytest # Uses the Python version automatically installed by uv
```
To install a specific version of Python, use
@@ -356,7 +386,7 @@ To install a specific version of Python, use
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install Python 3.12
@@ -375,7 +405,7 @@ output:
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
```

View File

@@ -0,0 +1 @@
3.11

View File

@@ -0,0 +1,6 @@
def main():
print("Hello from pyproject-toml-project!")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,19 @@
[project]
name = "pyproject-toml-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = []
[dependency-groups]
dev = [
"reuse==5.0.2",
{include-group = "lint"},
]
lint = [
"flake8==4.0.1",
]
[tool.uv]
required-version = "==0.5.14"

View File

@@ -0,0 +1 @@
3.11

View File

@@ -0,0 +1,6 @@
def main():
print("Hello from uv-toml-project!")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,10 @@
[project]
name = "uv-toml-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = []
[tool.uv]
required-version = "==0.5.14"

View File

@@ -0,0 +1 @@
required-version = "==0.5.15"

View File

@@ -4,8 +4,14 @@ description:
author: "astral-sh"
inputs:
version:
description: "The version of uv to install"
default: "latest"
description: "The version of uv to install e.g., `0.5.0` Defaults to the version in pyproject.toml or 'latest'."
default: ""
pyproject-file:
description: "Path to a pyproject.toml"
default: ""
uv-file:
description: "Path to a uv.toml"
default: ""
python-version:
description: "The version of Python to set UV_PYTHON to"
required: false
@@ -18,7 +24,7 @@ inputs:
required: false
default: ${{ github.token }}
enable-cache:
description: "Enable caching of the uv cache"
description: "Enable uploading of the uv cache"
default: "auto"
cache-dependency-glob:
description:

331
dist/save-cache/index.js generated vendored
View File

@@ -91444,15 +91444,6 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.STATE_CACHE_MATCHED_KEY = exports.STATE_CACHE_KEY = void 0;
exports.restoreCache = restoreCache;
@@ -91465,71 +91456,65 @@ const exec = __importStar(__nccwpck_require__(5236));
exports.STATE_CACHE_KEY = "cache-key";
exports.STATE_CACHE_MATCHED_KEY = "cache-matched-key";
const CACHE_VERSION = "1";
function restoreCache(version) {
return __awaiter(this, void 0, void 0, function* () {
const cacheKey = yield computeKeys(version);
let matchedKey;
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
try {
matchedKey = yield cache.restoreCache([inputs_1.cacheLocalPath], cacheKey);
}
catch (err) {
const message = err.message;
core.warning(message);
core.setOutput("cache-hit", false);
return;
}
core.saveState(exports.STATE_CACHE_KEY, cacheKey);
handleMatchResult(matchedKey, cacheKey);
});
async function restoreCache() {
const cacheKey = await computeKeys();
let matchedKey;
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
try {
matchedKey = await cache.restoreCache([inputs_1.cacheLocalPath], cacheKey);
}
catch (err) {
const message = err.message;
core.warning(message);
core.setOutput("cache-hit", false);
return;
}
core.saveState(exports.STATE_CACHE_KEY, cacheKey);
handleMatchResult(matchedKey, cacheKey);
}
function computeKeys(version) {
return __awaiter(this, void 0, void 0, function* () {
let cacheDependencyPathHash = "-";
if (inputs_1.cacheDependencyGlob !== "") {
core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`);
cacheDependencyPathHash += yield (0, hash_files_1.hashFiles)(inputs_1.cacheDependencyGlob, true);
if (cacheDependencyPathHash === "-") {
throw new Error(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`);
}
async function computeKeys() {
let cacheDependencyPathHash = "-";
if (inputs_1.cacheDependencyGlob !== "") {
core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`);
cacheDependencyPathHash += await (0, hash_files_1.hashFiles)(inputs_1.cacheDependencyGlob, true);
if (cacheDependencyPathHash === "-") {
core.warning(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`);
}
else {
cacheDependencyPathHash += "no-dependency-glob";
}
const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : "";
const pythonVersion = yield getPythonVersion();
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${(0, platforms_1.getPlatform)()}-${version}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
});
}
if (cacheDependencyPathHash === "-") {
cacheDependencyPathHash = "-no-dependency-glob";
}
const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : "";
const pythonVersion = await getPythonVersion();
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${(0, platforms_1.getPlatform)()}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
}
function getPythonVersion() {
return __awaiter(this, void 0, void 0, function* () {
if (inputs_1.pythonVersion !== "") {
return inputs_1.pythonVersion;
}
let output = "";
const options = {
silent: !core.isDebug(),
listeners: {
stdout: (data) => {
output += data.toString();
},
async function getPythonVersion() {
if (inputs_1.pythonVersion !== "") {
return inputs_1.pythonVersion;
}
let output = "";
const options = {
silent: !core.isDebug(),
listeners: {
stdout: (data) => {
output += data.toString();
},
};
try {
const execArgs = ["python", "find"];
yield exec.exec("uv", execArgs, options);
const pythonPath = output.trim();
output = "";
yield exec.exec(pythonPath, ["--version"], options);
// output is like "Python 3.8.10"
return output.split(" ")[1].trim();
}
catch (error) {
const err = error;
core.debug(`Failed to get python version from uv. Error: ${err.message}`);
return "unknown";
}
});
},
};
try {
const execArgs = ["python", "find"];
await exec.exec("uv", execArgs, options);
const pythonPath = output.trim();
output = "";
await exec.exec(pythonPath, ["--version"], options);
// output is like "Python 3.8.10"
return output.split(" ")[1].trim();
}
catch (error) {
const err = error;
core.debug(`Failed to get python version from uv. Error: ${err.message}`);
return "unknown";
}
}
function handleMatchResult(matchedKey, primaryKey) {
if (!matchedKey) {
@@ -91583,22 +91568,6 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.hashFiles = hashFiles;
const crypto = __importStar(__nccwpck_require__(7598));
@@ -91615,49 +91584,34 @@ const glob_1 = __nccwpck_require__(7206);
* @param pattern The glob pattern to match files.
* @param verbose Whether to log the files being hashed.
*/
function hashFiles(pattern_1) {
return __awaiter(this, arguments, void 0, function* (pattern, verbose = false) {
var _a, e_1, _b, _c;
const globber = yield (0, glob_1.create)(pattern);
let hasMatch = false;
const writeDelegate = verbose ? core.info : core.debug;
const result = crypto.createHash("sha256");
let count = 0;
try {
for (var _d = true, _e = __asyncValues(globber.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const file = _c;
writeDelegate(file);
if (fs.statSync(file).isDirectory()) {
writeDelegate(`Skip directory '${file}'.`);
continue;
}
const hash = crypto.createHash("sha256");
const pipeline = util.promisify(stream.pipeline);
yield pipeline(fs.createReadStream(file), hash);
result.write(hash.digest());
count++;
if (!hasMatch) {
hasMatch = true;
}
}
async function hashFiles(pattern, verbose = false) {
const globber = await (0, glob_1.create)(pattern);
let hasMatch = false;
const writeDelegate = verbose ? core.info : core.debug;
const result = crypto.createHash("sha256");
let count = 0;
for await (const file of globber.globGenerator()) {
writeDelegate(file);
if (fs.statSync(file).isDirectory()) {
writeDelegate(`Skip directory '${file}'.`);
continue;
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
}
finally { if (e_1) throw e_1.error; }
const hash = crypto.createHash("sha256");
const pipeline = util.promisify(stream.pipeline);
await pipeline(fs.createReadStream(file), hash);
result.write(hash.digest());
count++;
if (!hasMatch) {
hasMatch = true;
}
result.end();
if (hasMatch) {
writeDelegate(`Found ${count} files to hash.`);
return result.digest("hex");
}
writeDelegate("No matches found for glob");
return "";
});
}
result.end();
if (hasMatch) {
writeDelegate(`Found ${count} files to hash.`);
return result.digest("hex");
}
writeDelegate("No matches found for glob");
return "";
}
@@ -91701,15 +91655,6 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = run;
const cache = __importStar(__nccwpck_require__(5116));
@@ -91718,69 +91663,63 @@ const exec = __importStar(__nccwpck_require__(5236));
const fs = __importStar(__nccwpck_require__(3024));
const restore_cache_1 = __nccwpck_require__(5391);
const inputs_1 = __nccwpck_require__(9612);
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
if (inputs_1.enableCache) {
yield saveCache();
// node will stay alive if any promises are not resolved,
// which is a possibility if HTTP requests are dangling
// due to retries or timeouts. We know that if we got here
// that all promises that we care about have successfully
// resolved, so simply exit with success.
process.exit(0);
}
async function run() {
try {
if (inputs_1.enableCache) {
await saveCache();
// node will stay alive if any promises are not resolved,
// which is a possibility if HTTP requests are dangling
// due to retries or timeouts. We know that if we got here
// that all promises that we care about have successfully
// resolved, so simply exit with success.
process.exit(0);
}
catch (error) {
const err = error;
core.setFailed(err.message);
}
});
}
catch (error) {
const err = error;
core.setFailed(err.message);
}
}
function saveCache() {
return __awaiter(this, void 0, void 0, function* () {
const cacheKey = core.getState(restore_cache_1.STATE_CACHE_KEY);
const matchedKey = core.getState(restore_cache_1.STATE_CACHE_MATCHED_KEY);
if (!cacheKey) {
core.warning("Error retrieving cache key from state.");
return;
async function saveCache() {
const cacheKey = core.getState(restore_cache_1.STATE_CACHE_KEY);
const matchedKey = core.getState(restore_cache_1.STATE_CACHE_MATCHED_KEY);
if (!cacheKey) {
core.warning("Error retrieving cache key from state.");
return;
}
if (matchedKey === cacheKey) {
core.info(`Cache hit occurred on key ${cacheKey}, not saving cache.`);
return;
}
if (inputs_1.pruneCache) {
await pruneCache();
}
core.info(`Saving cache path: ${inputs_1.cacheLocalPath}`);
if (!fs.existsSync(inputs_1.cacheLocalPath) && !inputs_1.ignoreNothingToCache) {
throw new Error(`Cache path ${inputs_1.cacheLocalPath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`);
}
try {
await cache.saveCache([inputs_1.cacheLocalPath], cacheKey);
core.info(`cache saved with the key: ${cacheKey}`);
}
catch (e) {
if (e instanceof Error &&
e.message ===
"Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.") {
core.info("No cacheable paths were found. Ignoring because ignore-nothing-to-save is enabled.");
}
if (matchedKey === cacheKey) {
core.info(`Cache hit occurred on key ${cacheKey}, not saving cache.`);
return;
else {
throw e;
}
if (inputs_1.pruneCache) {
yield pruneCache();
}
core.info(`Saving cache path: ${inputs_1.cacheLocalPath}`);
if (!fs.existsSync(inputs_1.cacheLocalPath) && !inputs_1.ignoreNothingToCache) {
throw new Error(`Cache path ${inputs_1.cacheLocalPath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`);
}
try {
yield cache.saveCache([inputs_1.cacheLocalPath], cacheKey);
core.info(`cache saved with the key: ${cacheKey}`);
}
catch (e) {
if (e instanceof Error &&
e.message ===
"Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.") {
core.info("No cacheable paths were found. Ignoring because ignore-nothing-to-save is enabled.");
}
else {
throw e;
}
}
});
}
}
function pruneCache() {
return __awaiter(this, void 0, void 0, function* () {
const options = {
silent: !core.isDebug(),
};
const execArgs = ["cache", "prune", "--ci"];
core.info("Pruning cache...");
yield exec.exec("uv", execArgs, options);
});
async function pruneCache() {
const options = {
silent: !core.isDebug(),
};
const execArgs = ["cache", "prune", "--ci"];
core.info("Pruning cache...");
await exec.exec("uv", execArgs, options);
}
run();
@@ -91829,10 +91768,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.pythonVersion = exports.version = void 0;
exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.pythonVersion = exports.uvFile = exports.pyProjectFile = exports.version = void 0;
const core = __importStar(__nccwpck_require__(7484));
const node_path_1 = __importDefault(__nccwpck_require__(6760));
exports.version = core.getInput("version");
exports.pyProjectFile = core.getInput("pyproject-file");
exports.uvFile = core.getInput("uv-file");
exports.pythonVersion = core.getInput("python-version");
exports.checkSum = core.getInput("checksum");
exports.enableCache = getEnableCache();

1675
dist/setup/index.js generated vendored

File diff suppressed because it is too large Load Diff

260
dist/update-known-checksums/index.js generated vendored
View File

@@ -32368,6 +32368,150 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.KNOWN_CHECKSUMS = void 0;
// AUTOGENERATED_DO_NOT_EDIT
exports.KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.5.20": "d7f0c219808073f8ae8c6a991e85e5c7539b4e539b014a4ca5b3286911f06fd5",
"aarch64-unknown-linux-gnu-0.5.20": "3d2281312d047288ecb021f4c761cd351f993514e3ea7f369354701b3a44c756",
"aarch64-unknown-linux-musl-0.5.20": "162b19dbe6d82fd7846dd6ff25a7a6250ce4ee5d0d55e2e245625382984072b0",
"arm-unknown-linux-musleabihf-0.5.20": "19a06cf913bfb3d8ecb0e1c0368f98b03e9ec5a35ea3edc03a4e0af04f4f95ad",
"armv7-unknown-linux-gnueabihf-0.5.20": "769c07de286d607d0e13e9e83051a5ac0cfe1c34695ece976934345e09e97f4b",
"armv7-unknown-linux-musleabihf-0.5.20": "1330f3e38f6bdae2d2e2d458957e5531cf729989db942832aede12c5e5d5a1ab",
"i686-pc-windows-msvc-0.5.20": "389182a593b6f761dffb7c82c3eee3f8e4f4848fbf26fa1e6ab95ac3fcad687b",
"i686-unknown-linux-gnu-0.5.20": "88a1e7b7c08682fb379f540cfab31c38c31d5a7a3f227e5446dd9000519c7195",
"i686-unknown-linux-musl-0.5.20": "fb105fc9c3bbb4ad44ac5c0066cb9f48912f55a97f65dabaa48367198c0f87ea",
"powerpc64-unknown-linux-gnu-0.5.20": "a42c4bf4e397ed0d85bc5ed8d589f1e3dbd6f24fdbb16469ffa20b63977894aa",
"powerpc64le-unknown-linux-gnu-0.5.20": "bf52e43047ad4e7f178b62d2a175f0ee272f014a520726fe293960d03bfa122d",
"s390x-unknown-linux-gnu-0.5.20": "69c198eca4c81299a7a323df729e03ce6198d84fa26e9d98ea1e02436933469f",
"x86_64-apple-darwin-0.5.20": "22bb373a2bb0f15e441819a054e68798534d536b1b1943fdb813d6b53ffe48a4",
"x86_64-pc-windows-msvc-0.5.20": "dede2f71e7a15137ca17e3a1106e3797a650a2e2d607658f31ad4e986de3d67d",
"x86_64-unknown-linux-gnu-0.5.20": "8fdbfca767917f957e4541747cbf7b23b45c211109dbba97b49962fa3547aab4",
"x86_64-unknown-linux-musl-0.5.20": "5326a6d14d4668dafee4ecf36f7664103a25bf0918dfe162c8c49dab017b74ed",
"aarch64-apple-darwin-0.5.19": "f223bb08d04257dbba421736f906d91b040f654ab49963afc2f30f7949ae7b79",
"aarch64-unknown-linux-gnu-0.5.19": "2da1baa85958e5ee36f2ac85b0c56cb99c0c3140f6ff18c60825485b8193eedb",
"aarch64-unknown-linux-musl-0.5.19": "ff5b42337bd94f41db157f73b39d41586be8c76d8824550b0f6d5e808e5f0356",
"arm-unknown-linux-musleabihf-0.5.19": "84ae72130383340e14df47656f1974eb76a28ab7ed8b5c479bdbc8b907ad91e7",
"armv7-unknown-linux-gnueabihf-0.5.19": "bec22bc7e1d584749f26bc4d84116faf925f9db484fe0afb58f6a2aa0c04707c",
"armv7-unknown-linux-musleabihf-0.5.19": "79c575e9dcd58cf88e8b2fd37242ac923d04c31a62bed54db78219e35257a262",
"i686-pc-windows-msvc-0.5.19": "7f0439c0977baf5573d0c31820887fb0c478d2ef29fdad4256bf0a0b536a387f",
"i686-unknown-linux-gnu-0.5.19": "0b9a88787f80bda623987a314875c7cccfed599b5d2803565734c292e2cd33ef",
"i686-unknown-linux-musl-0.5.19": "e9a89334fadda0905da42017db76c63da9b1ef02ef9595acea322d1e73f1fea0",
"powerpc64-unknown-linux-gnu-0.5.19": "d891e5a5849e0220a49a31396371303d7f9de6c86b34f306c129a87dc6debfac",
"powerpc64le-unknown-linux-gnu-0.5.19": "efeb6ce7adff1ef45ca2e3351011a9a423add39f08676f5f4b85fdf2244fb8cd",
"s390x-unknown-linux-gnu-0.5.19": "a37620a3ce3d351adc57ce70249ee0bdce2fbd336886db6b4de4d31447644acb",
"x86_64-apple-darwin-0.5.19": "9af5050495e9fc114cabcb4c2dbaded65569ccc0583ab3f62a6d9977984b65fa",
"x86_64-pc-windows-msvc-0.5.19": "ada2b3d704a78e118f6c8e215468e8f50eef440211938970cdef79dfafe9ddc5",
"x86_64-unknown-linux-gnu-0.5.19": "ace8c180865bb87fb3d7004a8cafde78270676d87ab5531615f136cc860db78d",
"x86_64-unknown-linux-musl-0.5.19": "eb9d0e1db24c6abbfec3e589f55efd2ef9ce9313f89bf1dd934635d194762b57",
"aarch64-apple-darwin-0.5.18": "13bcde0a15c50af976980b484f140e10969df67488542856a2152534f255c675",
"aarch64-unknown-linux-gnu-0.5.18": "a511f609236b9bfc9dedfcb9867ef1d0f1dc23cc2012f9e4e38e0c184657fd31",
"aarch64-unknown-linux-musl-0.5.18": "5b1bd1471f4d8298f11da5f025bdbcc4c8057a24c8b95573003c0320b6fa99a8",
"arm-unknown-linux-musleabihf-0.5.18": "4262e0a6c14998c8637f1ba018980464a5e6aeb5f35aaa0149643c99a32631b3",
"armv7-unknown-linux-gnueabihf-0.5.18": "29d4f9b0c020f55de11c9bd24cf8360771c1893275dd9e3b978f0fe4421bfb4f",
"armv7-unknown-linux-musleabihf-0.5.18": "95049e75c3da2113142da0b9e60451c43fac44702590f4e5abb6fc7cde744429",
"i686-pc-windows-msvc-0.5.18": "06729cf6685f0271e91bcb5cf748d18a5c5d793fa9e0a611d0c7541a0aed574a",
"i686-unknown-linux-gnu-0.5.18": "d92146688e5b1a7ddb79e8f91d91c8174d44a5945b06797cd17bbf187f13da64",
"i686-unknown-linux-musl-0.5.18": "1ec37579d0dec4739c707cb5096c52dea9319196dfd63ea6e121e16074892cac",
"powerpc64-unknown-linux-gnu-0.5.18": "e6cf16040aabb5b1940e88841dcc90967aa592c8c7492699449ca050713cb567",
"powerpc64le-unknown-linux-gnu-0.5.18": "3efccbb5820be67b270333f9ca87d2d598e38648a6ea7a3fb9970a5a424be11f",
"s390x-unknown-linux-gnu-0.5.18": "f7903ade2a7747041d5d10f043e01e0a6c9c881b6fe7cb1bd54b9efac8ed7620",
"x86_64-apple-darwin-0.5.18": "e77b6b35169d2e0a3b43d43690f813136c94e24e4eef72d560e7901e42621d18",
"x86_64-pc-windows-msvc-0.5.18": "77f414173d0970c8977a614585fc013290659b0d74ae22be24559fde915832de",
"x86_64-unknown-linux-gnu-0.5.18": "1dbaeffc5cfac769f99700c0fc8c4ef4494a339720c6bf8b79367b1acd701b46",
"x86_64-unknown-linux-musl-0.5.18": "d4d3bf7dda0fd66a34ee99407506b753213bbe6e4076c0c38c4b645d00406979",
"aarch64-apple-darwin-0.5.17": "9e041a7c0bbd8a653b2272e03ba5de5b726dcbbccc3ffcc526dc7de9f14ad334",
"aarch64-unknown-linux-gnu-0.5.17": "22164a4a86272ab2a4af2b01773a7e636f643426831f4dd9c71b2760c592a57b",
"aarch64-unknown-linux-musl-0.5.17": "86021b10ad06f97a82d605ae7b7e580cd17d29b2877b65e31ef63db50514d2b0",
"arm-unknown-linux-musleabihf-0.5.17": "b68e96d7abb87180a44f9b315db2d3f88ad59325b10451b561e0620edd71d476",
"armv7-unknown-linux-gnueabihf-0.5.17": "125662419ae6b2332d2bab6764ba8ef9396fd0cc9487a5fbbcf41bdcf379e697",
"armv7-unknown-linux-musleabihf-0.5.17": "f8d2dcee69ad15858a827265db527184bdbd07b60a24e04d2d9787abf781cc0b",
"i686-pc-windows-msvc-0.5.17": "1aecdd843d15a0149cf83d07c3b36d184578a6a07fcf2730ef9986393259e960",
"i686-unknown-linux-gnu-0.5.17": "4165443b8757cdcd615ccfe721aac5137c7d4165ae9dc2640975c1035018f09c",
"i686-unknown-linux-musl-0.5.17": "0242308d2ffe1de6538d79a13aae4cee8a48bfc76e71d559836a2f43808393c0",
"powerpc64-unknown-linux-gnu-0.5.17": "a79bfc1c004339c1da253421b35471af383e724eaffe8ab332685b253402a7c1",
"powerpc64le-unknown-linux-gnu-0.5.17": "db2f384a7b9605b9ae03ca493f0c35174577a3b53d238861b11b9dc1c404cb16",
"s390x-unknown-linux-gnu-0.5.17": "4312abce9f52dca597c4b4896e8f2f7575d50b2183af4c74412bc26eb6278d3f",
"x86_64-apple-darwin-0.5.17": "f66f961bf0c6e2bbc3e45de4692cdebb126edd5af4e920dea91a3fedabc502ee",
"x86_64-pc-windows-msvc-0.5.17": "00aed721abc4bb125d92b45733aa65a2254344bffed984d85cf0de6b164f5011",
"x86_64-unknown-linux-gnu-0.5.17": "6121d9693b2013e970e495872c5a750ff0e471c2618821c2d4314666c0bd9ee7",
"x86_64-unknown-linux-musl-0.5.17": "0aa0d03f80422a066396a54c7d9f7f78576a22827860273fd635f97e04f3e1a7",
"aarch64-apple-darwin-0.5.16": "0b16039f469df078c1445f5b7f84d3c0342580c4592b5a4b604db2c86dc37c3e",
"aarch64-unknown-linux-gnu-0.5.16": "59d28abe79037f835020ba834f01ac5c1f96c8556c6ff9a06a8fd5701048731c",
"aarch64-unknown-linux-musl-0.5.16": "8913580d960e1d5a24316506b9925cb6aa4ab6547d88d7cab1aa5049825e1d4a",
"arm-unknown-linux-musleabihf-0.5.16": "e97d623d641a3c807bcafef222544786813ed5176d0dbea8d0f6adc2deea88b7",
"armv7-unknown-linux-gnueabihf-0.5.16": "fe814f38a72c7f264e4cd8fdcb84519bf92a88f0e67d7a0a6a38dc18e938c0fc",
"armv7-unknown-linux-musleabihf-0.5.16": "f72c8302fa59190a90ccb743d90d3efae71e78ea7c6b52c68b3e23b6c6fb3276",
"i686-pc-windows-msvc-0.5.16": "fe24a7b1438152d8dcc7acedaad3b15362ef2e58d496611819fd8b99942dc2ed",
"i686-unknown-linux-gnu-0.5.16": "d2ddc285d3962b45e05a59e62fb188d7bad3f969b45ff5256db0226efe44208b",
"i686-unknown-linux-musl-0.5.16": "ac6b59b6b383a852ba5c22df777f9c3f39a85364a485bcc4203ca427417cb25b",
"powerpc64-unknown-linux-gnu-0.5.16": "1ff9c39c6660548aa69934a25c8d92ffb11a7c9c1f39db9795e9f061ff34a8bd",
"powerpc64le-unknown-linux-gnu-0.5.16": "87c568a126d59d66b99ec087182f4cd9de336678dfb60c51da35d678160875d6",
"s390x-unknown-linux-gnu-0.5.16": "23c8331689d99c6fb70646a41a9d8ef5211d4eefe25baebb08b6b6c7f126af6e",
"x86_64-apple-darwin-0.5.16": "72732a379d2aff6585c6bfd52593042a470e752d6af685cc01e1ee06d817cddb",
"x86_64-pc-windows-msvc-0.5.16": "3fe298d7b10b63e9cec6711d03853874735f1dd33f655ad3ee6677965807883f",
"x86_64-unknown-linux-gnu-0.5.16": "a320393232ac29acfe75cd0d3fb943ee2a5cc3727d2c9d1bb14bb9eea1fc60c9",
"x86_64-unknown-linux-musl-0.5.16": "82962a1ef9ca888c32933fe9022c4b946e9bf047ffb0084a614b8cf7a5306dbf",
"aarch64-apple-darwin-0.5.15": "bb7409c4d7d503e929bcd31bf179ae6f555f5092d0d5dc38df37be9f29832859",
"aarch64-unknown-linux-gnu-0.5.15": "02f69686d0e1fe9673bb449fc45e53e6bfb0f48c5d371b35c145828c4239f123",
"aarch64-unknown-linux-musl-0.5.15": "78ac5d4c7b9773bb3f6867f452ed83dd2f38f26116d2369ff5b4ea02eb7519bd",
"arm-unknown-linux-musleabihf-0.5.15": "f416a9350161feacc48a96f90a1a38244d70f3ba07fbf96010ed477ff69814ed",
"armv7-unknown-linux-gnueabihf-0.5.15": "182c316f44df157979e7430fb952eced1ad8020d1d8d810e88ce6985c9428615",
"armv7-unknown-linux-musleabihf-0.5.15": "0b4400e8c22921355d5e69cf17cb0a44da93af09125e1dc636a69d2175a23898",
"i686-pc-windows-msvc-0.5.15": "9092e142ce3a35f8c9f36058c3278f6b99718c02d8b904001ccc1cd918a0c798",
"i686-unknown-linux-gnu-0.5.15": "d945431e618c2688ac62e640c16022c587a6f80677c64346280143d83939f93f",
"i686-unknown-linux-musl-0.5.15": "6e1a968662a0952083e9a297ec067606621f93b55ccfbdd8ca475fd13b328d90",
"powerpc64-unknown-linux-gnu-0.5.15": "58a6663e477645194c34dfac96b4c42ba6e7c4b5aa851c1e52276769b279b605",
"powerpc64le-unknown-linux-gnu-0.5.15": "c7281fa8fedd6332c594faa7e1dc1555960c7fb60d3e1b013309651b8d53377d",
"s390x-unknown-linux-gnu-0.5.15": "590751ffaf36f3f01b66afcb7de844ed0f69aeb2b54595cf191a4e60ddfab11c",
"x86_64-apple-darwin-0.5.15": "6a729cb237d895eebeb65363419f41b217dbcd745819bcef61098a5ddd583f08",
"x86_64-pc-windows-msvc-0.5.15": "2c49a892f793b957b0add32aa21a64940caf4bc03319cf0bb3b27caeebb985f7",
"x86_64-unknown-linux-gnu-0.5.15": "6c650324daafc07331c00b458872d50f56f160544015c8a499fd2e160b404ebb",
"x86_64-unknown-linux-musl-0.5.15": "40d8564e954bbd18f2c5ba80978491c3a25ab49e067664daf525e34c38a370b8",
"aarch64-apple-darwin-0.5.14": "d548dffc256014c4c8c693e148140a3a21bcc2bf066a35e1d5f0d24c91d32112",
"aarch64-unknown-linux-gnu-0.5.14": "1c9cdb265b0c24ce2e74b7795a00842dc6d487c11ba49aa6c9ca1c784b82755a",
"aarch64-unknown-linux-musl-0.5.14": "64c5321f5141db39e04209d170db34fcef5c8de3f561346dc0c1d132801c4f88",
"arm-unknown-linux-musleabihf-0.5.14": "903f87c609479099c87c229429f2a25f451689d862ee19170f6d87ab656815a0",
"armv7-unknown-linux-gnueabihf-0.5.14": "c33a4caa441c770ca720d301059eeb6af5473ceb22b69adf08b99043c3e4a854",
"armv7-unknown-linux-musleabihf-0.5.14": "c3b1bbe0d70e916abdd557092bf94c4830f98c471fe7d45b23d4dec8546251f3",
"i686-pc-windows-msvc-0.5.14": "2ea709cf816b70661c6aa43d6aff7526faebafc2d45f7167d3192c5b9bb0a28f",
"i686-unknown-linux-gnu-0.5.14": "74fd05a1e04bb8c591cb4531d517848d1e2cdc05762ccd291429c165e2a19aa1",
"i686-unknown-linux-musl-0.5.14": "a616553164336a57fc154a424d44cd75eb06104bc4e69f3d757e3da90a90d31f",
"powerpc64-unknown-linux-gnu-0.5.14": "4b675ac963f4d90034f8b8de8b03e0691b7e48eb8ce7bf5449ea65774750dfd4",
"powerpc64le-unknown-linux-gnu-0.5.14": "2a7bb1d27a6a057cbd5f62a5bc2ec77175c71224de8fb1bb5107acb1a07cc02a",
"s390x-unknown-linux-gnu-0.5.14": "68acbfadd9e100b69b31f4995265b716465df909a7d110bba76d93e8adc3a76b",
"x86_64-apple-darwin-0.5.14": "8caf91b936ede1167abaebae07c2a1cbb22473355fa0ad7ebb2580307e84fb47",
"x86_64-pc-windows-msvc-0.5.14": "ee2468e40320a0a2a36435e66bbd0d861228c4c06767f22d97876528138f4ba0",
"x86_64-unknown-linux-gnu-0.5.14": "22034760075b92487b326da5aa1a2a3e1917e2e766c12c0fd466fccda77013c7",
"x86_64-unknown-linux-musl-0.5.14": "e1ccdfe1691c1f791d84bb6e1697e49416ca4b62103dcdf3b63772f03834f113",
"aarch64-apple-darwin-0.5.13": "8a1ddbe5131c50cbf5247f2f335252d14767a7ff74f08c8a1813f003bc86d37f",
"aarch64-unknown-linux-gnu-0.5.13": "d0054db9ba0ec472ee6d28fa3eda94fb021b5e77c962f3bb1ff4b4fa7934e66d",
"aarch64-unknown-linux-musl-0.5.13": "fcbc405bdf8f6edf25818b756af702e8161528f4317d65310d9a0d4e02d7f544",
"arm-unknown-linux-musleabihf-0.5.13": "ba382034294dffcbe36d4a299a5c69c4f48caac9c4b78a1727c7fc9101175202",
"armv7-unknown-linux-gnueabihf-0.5.13": "cc28eeaa29b85f17c27cefe96497b3448024e14b5bc92921e1b7d157375d2334",
"armv7-unknown-linux-musleabihf-0.5.13": "449b680c4a3d936e9005e39983208a183e0fffa62fe73e6daed85f51389fc40e",
"i686-pc-windows-msvc-0.5.13": "c1531c2f1eb8c36b2947abf039caf1aeba4253c3c35716705ca339a0a3d96594",
"i686-unknown-linux-gnu-0.5.13": "35b964c75699b6569d950fb39561146b830101403c9a937ace1fc64fc1967c1b",
"i686-unknown-linux-musl-0.5.13": "a33007ed60d67fa4c5b7689c1adb33751a5c1a8732057ed84b9deddbb39cd3a6",
"powerpc64-unknown-linux-gnu-0.5.13": "9e34fc400e51f3331452083dd5e54fadc0f3be81f7901772366faf4c75e2680b",
"powerpc64le-unknown-linux-gnu-0.5.13": "ee01812f102379bc9bb6ea991f81536c9546a5f0d4990b9ed1fbb1900cb5f647",
"s390x-unknown-linux-gnu-0.5.13": "f43c42318411ff5f3e8ea4be2228e71fb28b01ffcc08259bb301877c7f7155e0",
"x86_64-apple-darwin-0.5.13": "f871b2b002b750438e5e6df4b0809a9f7d089bc5d4d0466bc63577c9ecc59979",
"x86_64-pc-windows-msvc-0.5.13": "c8a2e7e8bd87866fd1d52dbd4b4c0d85f328a6dcdeff17b85cc9c9af447ef3c3",
"x86_64-unknown-linux-gnu-0.5.13": "0127da50d3c361d094545aab32921bbce856b3fcc24f1d10436a6426b3f16330",
"x86_64-unknown-linux-musl-0.5.13": "1afaef0180a6b9fe43fa6658443796b8e235fc41382a451634515890cf3aca06",
"aarch64-apple-darwin-0.5.12": "9eb8e0d3487f5389bec2c60cea37bb0a4d028513bffe854b9ece82d538c0f312",
"aarch64-unknown-linux-gnu-0.5.12": "ed8b4928a148365a84133ce96344fc22ac62674db2c6bef88853d0e38791e8d8",
"aarch64-unknown-linux-musl-0.5.12": "3ce19d81232cd2dcc2646060370a1583ca5558e7f61d934ae22798006719341d",
"arm-unknown-linux-musleabihf-0.5.12": "744409cd0b7f6314b8ba140cb63f72e2576dfec5c83491d12455775d870d508d",
"armv7-unknown-linux-gnueabihf-0.5.12": "452f8b769818858c3343444396d270d34026f0f7649cc89c4076ecdc8eb6d391",
"armv7-unknown-linux-musleabihf-0.5.12": "35abf5e98f2c9a8250045a58a568086f0e223be703c090134bedaf6279ebaac5",
"i686-pc-windows-msvc-0.5.12": "04f91508e6aeb7a2054e98552ff537b9863afbcbd4f72ba8bf8d9e9e25b37808",
"i686-unknown-linux-gnu-0.5.12": "38c8fbdb74ee9eb95ecdb4b843d9014d47214cdf5415520378161979d1b0cb34",
"i686-unknown-linux-musl-0.5.12": "6a8bb35f83c2a66711da3cee8d939e8893b34b25ae6cb53590c111637a93d527",
"powerpc64-unknown-linux-gnu-0.5.12": "d1477f41b919c60d10a191bd81aeec0185cec7efb0364d9689b202b3a6607912",
"powerpc64le-unknown-linux-gnu-0.5.12": "12629950b444487c66a3a99f0ff0f82f11a7b0a57e8305b2767eed5b85a4a3bb",
"s390x-unknown-linux-gnu-0.5.12": "36fc6d9ee6294ce54a2e3e92f10df094bebdd2862c29223bde18361aad9a9f1d",
"x86_64-apple-darwin-0.5.12": "78f38c88bf5e410600cd8f8ee4d5ba3ee781c94c091b1a57566256a2178ef4a3",
"x86_64-pc-windows-msvc-0.5.12": "04b45a4af12c0bb7cc31004dfcfed2e722c4ca07e1ac58850f93a9343dd5d06f",
"x86_64-unknown-linux-gnu-0.5.12": "65b8dcf3f3e592887fae0daf1b3a9e3aad1262f74bb21cf80d1700c7caba7f23",
"x86_64-unknown-linux-musl-0.5.12": "bd517e6508feef0261289b16c844c377127f21377c18c4a564d0d09add556fca",
"aarch64-apple-darwin-0.5.11": "695f3640d5b1a4e28de7e36e3a2e14072852dcc6c70bf9e4deec6ada00d516b4",
"aarch64-unknown-linux-gnu-0.5.11": "055c329c38a93c01d378349d51cb4d521d1998c8a79355ddc00f863ce451942f",
"aarch64-unknown-linux-musl-0.5.11": "d0bb82d8bceb561dc785f3811f5f5a427f1be47b654f0cc5d6c36d779e03a3ff",
@@ -34607,39 +34751,28 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.updateChecksums = updateChecksums;
const node_fs_1 = __nccwpck_require__(3024);
const tc = __importStar(__nccwpck_require__(3472));
const known_checksums_1 = __nccwpck_require__(2764);
function updateChecksums(filePath, downloadUrls) {
return __awaiter(this, void 0, void 0, function* () {
yield node_fs_1.promises.rm(filePath);
yield node_fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: { [key: string]: string } = {\n");
let firstLine = true;
for (const downloadUrl of downloadUrls) {
const key = getKey(downloadUrl);
if (key === undefined) {
continue;
}
const checksum = yield getOrDownloadChecksum(key, downloadUrl);
if (!firstLine) {
yield node_fs_1.promises.appendFile(filePath, ",\n");
}
yield node_fs_1.promises.appendFile(filePath, ` "${key}":\n "${checksum}"`);
firstLine = false;
async function updateChecksums(filePath, downloadUrls) {
await node_fs_1.promises.rm(filePath);
await node_fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: { [key: string]: string } = {\n");
let firstLine = true;
for (const downloadUrl of downloadUrls) {
const key = getKey(downloadUrl);
if (key === undefined) {
continue;
}
yield node_fs_1.promises.appendFile(filePath, ",\n};\n");
});
const checksum = await getOrDownloadChecksum(key, downloadUrl);
if (!firstLine) {
await node_fs_1.promises.appendFile(filePath, ",\n");
}
await node_fs_1.promises.appendFile(filePath, ` "${key}":\n "${checksum}"`);
firstLine = false;
}
await node_fs_1.promises.appendFile(filePath, ",\n};\n");
}
function getKey(downloadUrl) {
// https://github.com/astral-sh/uv/releases/download/0.3.2/uv-aarch64-apple-darwin.tar.gz.sha256
@@ -34652,25 +34785,21 @@ function getKey(downloadUrl) {
const version = parts[parts.length - 2];
return `${name}-${version}`;
}
function getOrDownloadChecksum(key, downloadUrl) {
return __awaiter(this, void 0, void 0, function* () {
let checksum = "";
if (key in known_checksums_1.KNOWN_CHECKSUMS) {
checksum = known_checksums_1.KNOWN_CHECKSUMS[key];
}
else {
const content = yield downloadAssetContent(downloadUrl);
checksum = content.split(" ")[0].trim();
}
return checksum;
});
async function getOrDownloadChecksum(key, downloadUrl) {
let checksum = "";
if (key in known_checksums_1.KNOWN_CHECKSUMS) {
checksum = known_checksums_1.KNOWN_CHECKSUMS[key];
}
else {
const content = await downloadAssetContent(downloadUrl);
checksum = content.split(" ")[0].trim();
}
return checksum;
}
function downloadAssetContent(downloadUrl) {
return __awaiter(this, void 0, void 0, function* () {
const downloadPath = yield tc.downloadTool(downloadUrl);
const content = yield node_fs_1.promises.readFile(downloadPath, "utf8");
return content;
});
async function downloadAssetContent(downloadUrl) {
const downloadPath = await tc.downloadTool(downloadUrl);
const content = await node_fs_1.promises.readFile(downloadPath, "utf8");
return content;
}
@@ -34714,39 +34843,28 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const github = __importStar(__nccwpck_require__(3228));
const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(6156);
const semver = __importStar(__nccwpck_require__(9318));
const update_known_checksums_1 = __nccwpck_require__(6182);
function run() {
return __awaiter(this, void 0, void 0, function* () {
const checksumFilePath = process.argv.slice(2)[0];
const github_token = process.argv.slice(2)[1];
const octokit = github.getOctokit(github_token, { baseUrl: constants_1.GITHUB_COM_API });
const response = yield octokit.paginate(octokit.rest.repos.listReleases, {
owner: constants_1.OWNER,
repo: constants_1.REPO,
});
const downloadUrls = response.flatMap((release) => release.assets
.filter((asset) => asset.name.endsWith(".sha256"))
.map((asset) => asset.browser_download_url));
yield (0, update_known_checksums_1.updateChecksums)(checksumFilePath, downloadUrls);
const latestVersion = response
.map((release) => release.tag_name)
.sort(semver.rcompare)[0];
core.setOutput("latest-version", latestVersion);
async function run() {
const checksumFilePath = process.argv.slice(2)[0];
const github_token = process.argv.slice(2)[1];
const octokit = github.getOctokit(github_token, { baseUrl: constants_1.GITHUB_COM_API });
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: constants_1.OWNER,
repo: constants_1.REPO,
});
const downloadUrls = response.flatMap((release) => release.assets
.filter((asset) => asset.name.endsWith(".sha256"))
.map((asset) => asset.browser_download_url));
await (0, update_known_checksums_1.updateChecksums)(checksumFilePath, downloadUrls);
const latestVersion = response
.map((release) => release.tag_name)
.sort(semver.rcompare)[0];
core.setOutput("latest-version", latestVersion);
}
run();

253
package-lock.json generated
View File

@@ -16,17 +16,18 @@
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1",
"@octokit/rest": "^21.0.2"
"@octokit/rest": "^21.1.0",
"smol-toml": "^1.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^22.10.2",
"@types/node": "^22.10.6",
"@types/semver": "^7.5.8",
"@vercel/ncc": "^0.38.3",
"jest": "^29.7.0",
"js-yaml": "^4.1.0",
"ts-jest": "^29.2.5",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
}
},
"node_modules/@actions/cache": {
@@ -1762,14 +1763,14 @@
}
},
"node_modules/@octokit/rest": {
"version": "21.0.2",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.0.2.tgz",
"integrity": "sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==",
"version": "21.1.0",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.1.0.tgz",
"integrity": "sha512-93iLxcKDJboUpmnUyeJ6cRIi7z7cqTZT1K7kRK4LobGxwTwpsa+2tQQbRQNGy7IFDEAmrtkf4F4wBj3D5rVlJQ==",
"dependencies": {
"@octokit/core": "^6.1.2",
"@octokit/plugin-paginate-rest": "^11.0.0",
"@octokit/core": "^6.1.3",
"@octokit/plugin-paginate-rest": "^11.4.0",
"@octokit/plugin-request-log": "^5.3.1",
"@octokit/plugin-rest-endpoint-methods": "^13.0.0"
"@octokit/plugin-rest-endpoint-methods": "^13.3.0"
},
"engines": {
"node": ">= 18"
@@ -1784,15 +1785,15 @@
}
},
"node_modules/@octokit/rest/node_modules/@octokit/core": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz",
"integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==",
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.3.tgz",
"integrity": "sha512-z+j7DixNnfpdToYsOutStDgeRzJSMnbj8T1C/oQjB6Aa+kRfNjs/Fn7W6c8bmlt6mfy3FkgeKBRnDjxQow5dow==",
"dependencies": {
"@octokit/auth-token": "^5.0.0",
"@octokit/graphql": "^8.0.0",
"@octokit/request": "^9.0.0",
"@octokit/request-error": "^6.0.1",
"@octokit/types": "^13.0.0",
"@octokit/graphql": "^8.1.2",
"@octokit/request": "^9.1.4",
"@octokit/request-error": "^6.1.6",
"@octokit/types": "^13.6.2",
"before-after-hook": "^3.0.2",
"universal-user-agent": "^7.0.0"
},
@@ -1801,11 +1802,11 @@
}
},
"node_modules/@octokit/rest/node_modules/@octokit/endpoint": {
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz",
"integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==",
"version": "10.1.2",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.2.tgz",
"integrity": "sha512-XybpFv9Ms4hX5OCHMZqyODYqGTZ3H6K6Vva+M9LR7ib/xr1y1ZnlChYv9H680y77Vd/i/k+thXApeRASBQkzhA==",
"dependencies": {
"@octokit/types": "^13.0.0",
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.2"
},
"engines": {
@@ -1813,12 +1814,12 @@
}
},
"node_modules/@octokit/rest/node_modules/@octokit/graphql": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.1.tgz",
"integrity": "sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==",
"version": "8.1.2",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.2.tgz",
"integrity": "sha512-bdlj/CJVjpaz06NBpfHhp4kGJaRZfz7AzC+6EwUImRtrwIw8dIgJ63Xg0OzV9pRn3rIzrt5c2sa++BL0JJ8GLw==",
"dependencies": {
"@octokit/request": "^9.0.0",
"@octokit/types": "^13.0.0",
"@octokit/request": "^9.1.4",
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.0"
},
"engines": {
@@ -1826,22 +1827,22 @@
}
},
"node_modules/@octokit/rest/node_modules/@octokit/openapi-types": {
"version": "22.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz",
"integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg=="
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest": {
"version": "11.3.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.1.tgz",
"integrity": "sha512-ryqobs26cLtM1kQxqeZui4v8FeznirUsksiA+RYemMPJ7Micju0WSkv50dBksTuZks9O5cg4wp+t8fZ/cLY56g==",
"version": "11.4.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.0.tgz",
"integrity": "sha512-ttpGck5AYWkwMkMazNCZMqxKqIq1fJBNxBfsFwwfyYKTf914jKkLF0POMS3YkPBwp5g1c2Y4L79gDz01GhSr1g==",
"dependencies": {
"@octokit/types": "^13.5.0"
"@octokit/types": "^13.7.0"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": "5"
"@octokit/core": ">=6"
}
},
"node_modules/@octokit/rest/node_modules/@octokit/plugin-request-log": {
@@ -1856,27 +1857,28 @@
}
},
"node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.2.tgz",
"integrity": "sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA==",
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.0.tgz",
"integrity": "sha512-LUm44shlmkp/6VC+qQgHl3W5vzUP99ZM54zH6BuqkJK4DqfFLhegANd+fM4YRLapTvPm4049iG7F3haANKMYvQ==",
"dependencies": {
"@octokit/types": "^13.5.0"
"@octokit/types": "^13.7.0"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": "^5"
"@octokit/core": ">=6"
}
},
"node_modules/@octokit/rest/node_modules/@octokit/request": {
"version": "9.1.3",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz",
"integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==",
"version": "9.1.4",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.4.tgz",
"integrity": "sha512-tMbOwGm6wDII6vygP3wUVqFTw3Aoo0FnVQyhihh8vVq12uO3P+vQZeo2CKMpWtPSogpACD0yyZAlVlQnjW71DA==",
"dependencies": {
"@octokit/endpoint": "^10.0.0",
"@octokit/request-error": "^6.0.1",
"@octokit/types": "^13.1.0",
"@octokit/types": "^13.6.2",
"fast-content-type-parse": "^2.0.0",
"universal-user-agent": "^7.0.2"
},
"engines": {
@@ -1884,22 +1886,22 @@
}
},
"node_modules/@octokit/rest/node_modules/@octokit/request-error": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.4.tgz",
"integrity": "sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==",
"version": "6.1.6",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.6.tgz",
"integrity": "sha512-pqnVKYo/at0NuOjinrgcQYpEbv4snvP3bKMRqHaD9kIsk9u1LCpb2smHZi8/qJfgeNqLo5hNW4Z7FezNdEo0xg==",
"dependencies": {
"@octokit/types": "^13.0.0"
"@octokit/types": "^13.6.2"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/rest/node_modules/@octokit/types": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz",
"integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==",
"version": "13.7.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.7.0.tgz",
"integrity": "sha512-BXfRP+3P3IN6fd4uF3SniaHKOO4UXWBfkdR3vA8mIvaoO/wLjGN5qivUtW0QRitBHHMcfC41SLhNVYIZZE+wkA==",
"dependencies": {
"@octokit/openapi-types": "^22.2.0"
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/rest/node_modules/before-after-hook": {
@@ -2097,9 +2099,9 @@
}
},
"node_modules/@types/node": {
"version": "22.10.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz",
"integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==",
"version": "22.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.6.tgz",
"integrity": "sha512-qNiuwC4ZDAUNcY47xgaSuS92cjf8JbSUoaKS77bmLG1rU7MlATVSiw/IlrjtIyyskXBZ8KkNfjK/P5na7rgXbQ==",
"dependencies": {
"undici-types": "~6.20.0"
}
@@ -2876,6 +2878,21 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
"node_modules/fast-content-type-parse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz",
"integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fastify"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fastify"
}
]
},
"node_modules/fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
@@ -4555,6 +4572,17 @@
"node": ">=8"
}
},
"node_modules/smol-toml": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz",
"integrity": "sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ==",
"engines": {
"node": ">= 18"
},
"funding": {
"url": "https://github.com/sponsors/cyyynthia"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -4851,9 +4879,9 @@
}
},
"node_modules/typescript": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
"integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
"version": "5.7.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -6451,14 +6479,14 @@
}
},
"@octokit/rest": {
"version": "21.0.2",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.0.2.tgz",
"integrity": "sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==",
"version": "21.1.0",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.1.0.tgz",
"integrity": "sha512-93iLxcKDJboUpmnUyeJ6cRIi7z7cqTZT1K7kRK4LobGxwTwpsa+2tQQbRQNGy7IFDEAmrtkf4F4wBj3D5rVlJQ==",
"requires": {
"@octokit/core": "^6.1.2",
"@octokit/plugin-paginate-rest": "^11.0.0",
"@octokit/core": "^6.1.3",
"@octokit/plugin-paginate-rest": "^11.4.0",
"@octokit/plugin-request-log": "^5.3.1",
"@octokit/plugin-rest-endpoint-methods": "^13.0.0"
"@octokit/plugin-rest-endpoint-methods": "^13.3.0"
},
"dependencies": {
"@octokit/auth-token": {
@@ -6467,49 +6495,49 @@
"integrity": "sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA=="
},
"@octokit/core": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz",
"integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==",
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.3.tgz",
"integrity": "sha512-z+j7DixNnfpdToYsOutStDgeRzJSMnbj8T1C/oQjB6Aa+kRfNjs/Fn7W6c8bmlt6mfy3FkgeKBRnDjxQow5dow==",
"requires": {
"@octokit/auth-token": "^5.0.0",
"@octokit/graphql": "^8.0.0",
"@octokit/request": "^9.0.0",
"@octokit/request-error": "^6.0.1",
"@octokit/types": "^13.0.0",
"@octokit/graphql": "^8.1.2",
"@octokit/request": "^9.1.4",
"@octokit/request-error": "^6.1.6",
"@octokit/types": "^13.6.2",
"before-after-hook": "^3.0.2",
"universal-user-agent": "^7.0.0"
}
},
"@octokit/endpoint": {
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz",
"integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==",
"version": "10.1.2",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.2.tgz",
"integrity": "sha512-XybpFv9Ms4hX5OCHMZqyODYqGTZ3H6K6Vva+M9LR7ib/xr1y1ZnlChYv9H680y77Vd/i/k+thXApeRASBQkzhA==",
"requires": {
"@octokit/types": "^13.0.0",
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.2"
}
},
"@octokit/graphql": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.1.tgz",
"integrity": "sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==",
"version": "8.1.2",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.2.tgz",
"integrity": "sha512-bdlj/CJVjpaz06NBpfHhp4kGJaRZfz7AzC+6EwUImRtrwIw8dIgJ63Xg0OzV9pRn3rIzrt5c2sa++BL0JJ8GLw==",
"requires": {
"@octokit/request": "^9.0.0",
"@octokit/types": "^13.0.0",
"@octokit/request": "^9.1.4",
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.0"
}
},
"@octokit/openapi-types": {
"version": "22.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz",
"integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg=="
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/plugin-paginate-rest": {
"version": "11.3.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.1.tgz",
"integrity": "sha512-ryqobs26cLtM1kQxqeZui4v8FeznirUsksiA+RYemMPJ7Micju0WSkv50dBksTuZks9O5cg4wp+t8fZ/cLY56g==",
"version": "11.4.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.0.tgz",
"integrity": "sha512-ttpGck5AYWkwMkMazNCZMqxKqIq1fJBNxBfsFwwfyYKTf914jKkLF0POMS3YkPBwp5g1c2Y4L79gDz01GhSr1g==",
"requires": {
"@octokit/types": "^13.5.0"
"@octokit/types": "^13.7.0"
}
},
"@octokit/plugin-request-log": {
@@ -6519,38 +6547,39 @@
"requires": {}
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.2.tgz",
"integrity": "sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA==",
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.0.tgz",
"integrity": "sha512-LUm44shlmkp/6VC+qQgHl3W5vzUP99ZM54zH6BuqkJK4DqfFLhegANd+fM4YRLapTvPm4049iG7F3haANKMYvQ==",
"requires": {
"@octokit/types": "^13.5.0"
"@octokit/types": "^13.7.0"
}
},
"@octokit/request": {
"version": "9.1.3",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz",
"integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==",
"version": "9.1.4",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.4.tgz",
"integrity": "sha512-tMbOwGm6wDII6vygP3wUVqFTw3Aoo0FnVQyhihh8vVq12uO3P+vQZeo2CKMpWtPSogpACD0yyZAlVlQnjW71DA==",
"requires": {
"@octokit/endpoint": "^10.0.0",
"@octokit/request-error": "^6.0.1",
"@octokit/types": "^13.1.0",
"@octokit/types": "^13.6.2",
"fast-content-type-parse": "^2.0.0",
"universal-user-agent": "^7.0.2"
}
},
"@octokit/request-error": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.4.tgz",
"integrity": "sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==",
"version": "6.1.6",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.6.tgz",
"integrity": "sha512-pqnVKYo/at0NuOjinrgcQYpEbv4snvP3bKMRqHaD9kIsk9u1LCpb2smHZi8/qJfgeNqLo5hNW4Z7FezNdEo0xg==",
"requires": {
"@octokit/types": "^13.0.0"
"@octokit/types": "^13.6.2"
}
},
"@octokit/types": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz",
"integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==",
"version": "13.7.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.7.0.tgz",
"integrity": "sha512-BXfRP+3P3IN6fd4uF3SniaHKOO4UXWBfkdR3vA8mIvaoO/wLjGN5qivUtW0QRitBHHMcfC41SLhNVYIZZE+wkA==",
"requires": {
"@octokit/openapi-types": "^22.2.0"
"@octokit/openapi-types": "^23.0.1"
}
},
"before-after-hook": {
@@ -6730,9 +6759,9 @@
}
},
"@types/node": {
"version": "22.10.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz",
"integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==",
"version": "22.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.6.tgz",
"integrity": "sha512-qNiuwC4ZDAUNcY47xgaSuS92cjf8JbSUoaKS77bmLG1rU7MlATVSiw/IlrjtIyyskXBZ8KkNfjK/P5na7rgXbQ==",
"requires": {
"undici-types": "~6.20.0"
}
@@ -7303,6 +7332,11 @@
"jest-util": "^29.7.0"
}
},
"fast-content-type-parse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz",
"integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q=="
},
"fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
@@ -8574,6 +8608,11 @@
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true
},
"smol-toml": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz",
"integrity": "sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ=="
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -8771,9 +8810,9 @@
"dev": true
},
"typescript": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
"integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
"version": "5.7.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
"dev": true
},
"undici": {

View File

@@ -30,16 +30,17 @@
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1",
"@octokit/rest": "^21.0.2"
"@octokit/rest": "^21.1.0",
"smol-toml": "^1.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^22.10.2",
"@types/node": "^22.10.6",
"@types/semver": "^7.5.8",
"@vercel/ncc": "^0.38.3",
"jest": "^29.7.0",
"js-yaml": "^4.1.0",
"ts-jest": "^29.2.5",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
}
}

View File

@@ -14,8 +14,8 @@ export const STATE_CACHE_KEY = "cache-key";
export const STATE_CACHE_MATCHED_KEY = "cache-matched-key";
const CACHE_VERSION = "1";
export async function restoreCache(version: string): Promise<void> {
const cacheKey = await computeKeys(version);
export async function restoreCache(): Promise<void> {
const cacheKey = await computeKeys();
let matchedKey: string | undefined;
core.info(
@@ -35,7 +35,7 @@ export async function restoreCache(version: string): Promise<void> {
handleMatchResult(matchedKey, cacheKey);
}
async function computeKeys(version: string): Promise<string> {
async function computeKeys(): Promise<string> {
let cacheDependencyPathHash = "-";
if (cacheDependencyGlob !== "") {
core.info(
@@ -43,16 +43,17 @@ async function computeKeys(version: string): Promise<string> {
);
cacheDependencyPathHash += await hashFiles(cacheDependencyGlob, true);
if (cacheDependencyPathHash === "-") {
throw new Error(
`No file matched to [${cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`,
core.warning(
`No file matched to [${cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`,
);
}
} else {
cacheDependencyPathHash += "no-dependency-glob";
}
if (cacheDependencyPathHash === "-") {
cacheDependencyPathHash = "-no-dependency-glob";
}
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
const pythonVersion = await getPythonVersion();
return `setup-uv-${CACHE_VERSION}-${getArch()}-${getPlatform()}-${version}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
return `setup-uv-${CACHE_VERSION}-${getArch()}-${getPlatform()}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
}
async function getPythonVersion(): Promise<string> {

View File

@@ -1,5 +1,293 @@
// AUTOGENERATED_DO_NOT_EDIT
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
"aarch64-apple-darwin-0.5.20":
"d7f0c219808073f8ae8c6a991e85e5c7539b4e539b014a4ca5b3286911f06fd5",
"aarch64-unknown-linux-gnu-0.5.20":
"3d2281312d047288ecb021f4c761cd351f993514e3ea7f369354701b3a44c756",
"aarch64-unknown-linux-musl-0.5.20":
"162b19dbe6d82fd7846dd6ff25a7a6250ce4ee5d0d55e2e245625382984072b0",
"arm-unknown-linux-musleabihf-0.5.20":
"19a06cf913bfb3d8ecb0e1c0368f98b03e9ec5a35ea3edc03a4e0af04f4f95ad",
"armv7-unknown-linux-gnueabihf-0.5.20":
"769c07de286d607d0e13e9e83051a5ac0cfe1c34695ece976934345e09e97f4b",
"armv7-unknown-linux-musleabihf-0.5.20":
"1330f3e38f6bdae2d2e2d458957e5531cf729989db942832aede12c5e5d5a1ab",
"i686-pc-windows-msvc-0.5.20":
"389182a593b6f761dffb7c82c3eee3f8e4f4848fbf26fa1e6ab95ac3fcad687b",
"i686-unknown-linux-gnu-0.5.20":
"88a1e7b7c08682fb379f540cfab31c38c31d5a7a3f227e5446dd9000519c7195",
"i686-unknown-linux-musl-0.5.20":
"fb105fc9c3bbb4ad44ac5c0066cb9f48912f55a97f65dabaa48367198c0f87ea",
"powerpc64-unknown-linux-gnu-0.5.20":
"a42c4bf4e397ed0d85bc5ed8d589f1e3dbd6f24fdbb16469ffa20b63977894aa",
"powerpc64le-unknown-linux-gnu-0.5.20":
"bf52e43047ad4e7f178b62d2a175f0ee272f014a520726fe293960d03bfa122d",
"s390x-unknown-linux-gnu-0.5.20":
"69c198eca4c81299a7a323df729e03ce6198d84fa26e9d98ea1e02436933469f",
"x86_64-apple-darwin-0.5.20":
"22bb373a2bb0f15e441819a054e68798534d536b1b1943fdb813d6b53ffe48a4",
"x86_64-pc-windows-msvc-0.5.20":
"dede2f71e7a15137ca17e3a1106e3797a650a2e2d607658f31ad4e986de3d67d",
"x86_64-unknown-linux-gnu-0.5.20":
"8fdbfca767917f957e4541747cbf7b23b45c211109dbba97b49962fa3547aab4",
"x86_64-unknown-linux-musl-0.5.20":
"5326a6d14d4668dafee4ecf36f7664103a25bf0918dfe162c8c49dab017b74ed",
"aarch64-apple-darwin-0.5.19":
"f223bb08d04257dbba421736f906d91b040f654ab49963afc2f30f7949ae7b79",
"aarch64-unknown-linux-gnu-0.5.19":
"2da1baa85958e5ee36f2ac85b0c56cb99c0c3140f6ff18c60825485b8193eedb",
"aarch64-unknown-linux-musl-0.5.19":
"ff5b42337bd94f41db157f73b39d41586be8c76d8824550b0f6d5e808e5f0356",
"arm-unknown-linux-musleabihf-0.5.19":
"84ae72130383340e14df47656f1974eb76a28ab7ed8b5c479bdbc8b907ad91e7",
"armv7-unknown-linux-gnueabihf-0.5.19":
"bec22bc7e1d584749f26bc4d84116faf925f9db484fe0afb58f6a2aa0c04707c",
"armv7-unknown-linux-musleabihf-0.5.19":
"79c575e9dcd58cf88e8b2fd37242ac923d04c31a62bed54db78219e35257a262",
"i686-pc-windows-msvc-0.5.19":
"7f0439c0977baf5573d0c31820887fb0c478d2ef29fdad4256bf0a0b536a387f",
"i686-unknown-linux-gnu-0.5.19":
"0b9a88787f80bda623987a314875c7cccfed599b5d2803565734c292e2cd33ef",
"i686-unknown-linux-musl-0.5.19":
"e9a89334fadda0905da42017db76c63da9b1ef02ef9595acea322d1e73f1fea0",
"powerpc64-unknown-linux-gnu-0.5.19":
"d891e5a5849e0220a49a31396371303d7f9de6c86b34f306c129a87dc6debfac",
"powerpc64le-unknown-linux-gnu-0.5.19":
"efeb6ce7adff1ef45ca2e3351011a9a423add39f08676f5f4b85fdf2244fb8cd",
"s390x-unknown-linux-gnu-0.5.19":
"a37620a3ce3d351adc57ce70249ee0bdce2fbd336886db6b4de4d31447644acb",
"x86_64-apple-darwin-0.5.19":
"9af5050495e9fc114cabcb4c2dbaded65569ccc0583ab3f62a6d9977984b65fa",
"x86_64-pc-windows-msvc-0.5.19":
"ada2b3d704a78e118f6c8e215468e8f50eef440211938970cdef79dfafe9ddc5",
"x86_64-unknown-linux-gnu-0.5.19":
"ace8c180865bb87fb3d7004a8cafde78270676d87ab5531615f136cc860db78d",
"x86_64-unknown-linux-musl-0.5.19":
"eb9d0e1db24c6abbfec3e589f55efd2ef9ce9313f89bf1dd934635d194762b57",
"aarch64-apple-darwin-0.5.18":
"13bcde0a15c50af976980b484f140e10969df67488542856a2152534f255c675",
"aarch64-unknown-linux-gnu-0.5.18":
"a511f609236b9bfc9dedfcb9867ef1d0f1dc23cc2012f9e4e38e0c184657fd31",
"aarch64-unknown-linux-musl-0.5.18":
"5b1bd1471f4d8298f11da5f025bdbcc4c8057a24c8b95573003c0320b6fa99a8",
"arm-unknown-linux-musleabihf-0.5.18":
"4262e0a6c14998c8637f1ba018980464a5e6aeb5f35aaa0149643c99a32631b3",
"armv7-unknown-linux-gnueabihf-0.5.18":
"29d4f9b0c020f55de11c9bd24cf8360771c1893275dd9e3b978f0fe4421bfb4f",
"armv7-unknown-linux-musleabihf-0.5.18":
"95049e75c3da2113142da0b9e60451c43fac44702590f4e5abb6fc7cde744429",
"i686-pc-windows-msvc-0.5.18":
"06729cf6685f0271e91bcb5cf748d18a5c5d793fa9e0a611d0c7541a0aed574a",
"i686-unknown-linux-gnu-0.5.18":
"d92146688e5b1a7ddb79e8f91d91c8174d44a5945b06797cd17bbf187f13da64",
"i686-unknown-linux-musl-0.5.18":
"1ec37579d0dec4739c707cb5096c52dea9319196dfd63ea6e121e16074892cac",
"powerpc64-unknown-linux-gnu-0.5.18":
"e6cf16040aabb5b1940e88841dcc90967aa592c8c7492699449ca050713cb567",
"powerpc64le-unknown-linux-gnu-0.5.18":
"3efccbb5820be67b270333f9ca87d2d598e38648a6ea7a3fb9970a5a424be11f",
"s390x-unknown-linux-gnu-0.5.18":
"f7903ade2a7747041d5d10f043e01e0a6c9c881b6fe7cb1bd54b9efac8ed7620",
"x86_64-apple-darwin-0.5.18":
"e77b6b35169d2e0a3b43d43690f813136c94e24e4eef72d560e7901e42621d18",
"x86_64-pc-windows-msvc-0.5.18":
"77f414173d0970c8977a614585fc013290659b0d74ae22be24559fde915832de",
"x86_64-unknown-linux-gnu-0.5.18":
"1dbaeffc5cfac769f99700c0fc8c4ef4494a339720c6bf8b79367b1acd701b46",
"x86_64-unknown-linux-musl-0.5.18":
"d4d3bf7dda0fd66a34ee99407506b753213bbe6e4076c0c38c4b645d00406979",
"aarch64-apple-darwin-0.5.17":
"9e041a7c0bbd8a653b2272e03ba5de5b726dcbbccc3ffcc526dc7de9f14ad334",
"aarch64-unknown-linux-gnu-0.5.17":
"22164a4a86272ab2a4af2b01773a7e636f643426831f4dd9c71b2760c592a57b",
"aarch64-unknown-linux-musl-0.5.17":
"86021b10ad06f97a82d605ae7b7e580cd17d29b2877b65e31ef63db50514d2b0",
"arm-unknown-linux-musleabihf-0.5.17":
"b68e96d7abb87180a44f9b315db2d3f88ad59325b10451b561e0620edd71d476",
"armv7-unknown-linux-gnueabihf-0.5.17":
"125662419ae6b2332d2bab6764ba8ef9396fd0cc9487a5fbbcf41bdcf379e697",
"armv7-unknown-linux-musleabihf-0.5.17":
"f8d2dcee69ad15858a827265db527184bdbd07b60a24e04d2d9787abf781cc0b",
"i686-pc-windows-msvc-0.5.17":
"1aecdd843d15a0149cf83d07c3b36d184578a6a07fcf2730ef9986393259e960",
"i686-unknown-linux-gnu-0.5.17":
"4165443b8757cdcd615ccfe721aac5137c7d4165ae9dc2640975c1035018f09c",
"i686-unknown-linux-musl-0.5.17":
"0242308d2ffe1de6538d79a13aae4cee8a48bfc76e71d559836a2f43808393c0",
"powerpc64-unknown-linux-gnu-0.5.17":
"a79bfc1c004339c1da253421b35471af383e724eaffe8ab332685b253402a7c1",
"powerpc64le-unknown-linux-gnu-0.5.17":
"db2f384a7b9605b9ae03ca493f0c35174577a3b53d238861b11b9dc1c404cb16",
"s390x-unknown-linux-gnu-0.5.17":
"4312abce9f52dca597c4b4896e8f2f7575d50b2183af4c74412bc26eb6278d3f",
"x86_64-apple-darwin-0.5.17":
"f66f961bf0c6e2bbc3e45de4692cdebb126edd5af4e920dea91a3fedabc502ee",
"x86_64-pc-windows-msvc-0.5.17":
"00aed721abc4bb125d92b45733aa65a2254344bffed984d85cf0de6b164f5011",
"x86_64-unknown-linux-gnu-0.5.17":
"6121d9693b2013e970e495872c5a750ff0e471c2618821c2d4314666c0bd9ee7",
"x86_64-unknown-linux-musl-0.5.17":
"0aa0d03f80422a066396a54c7d9f7f78576a22827860273fd635f97e04f3e1a7",
"aarch64-apple-darwin-0.5.16":
"0b16039f469df078c1445f5b7f84d3c0342580c4592b5a4b604db2c86dc37c3e",
"aarch64-unknown-linux-gnu-0.5.16":
"59d28abe79037f835020ba834f01ac5c1f96c8556c6ff9a06a8fd5701048731c",
"aarch64-unknown-linux-musl-0.5.16":
"8913580d960e1d5a24316506b9925cb6aa4ab6547d88d7cab1aa5049825e1d4a",
"arm-unknown-linux-musleabihf-0.5.16":
"e97d623d641a3c807bcafef222544786813ed5176d0dbea8d0f6adc2deea88b7",
"armv7-unknown-linux-gnueabihf-0.5.16":
"fe814f38a72c7f264e4cd8fdcb84519bf92a88f0e67d7a0a6a38dc18e938c0fc",
"armv7-unknown-linux-musleabihf-0.5.16":
"f72c8302fa59190a90ccb743d90d3efae71e78ea7c6b52c68b3e23b6c6fb3276",
"i686-pc-windows-msvc-0.5.16":
"fe24a7b1438152d8dcc7acedaad3b15362ef2e58d496611819fd8b99942dc2ed",
"i686-unknown-linux-gnu-0.5.16":
"d2ddc285d3962b45e05a59e62fb188d7bad3f969b45ff5256db0226efe44208b",
"i686-unknown-linux-musl-0.5.16":
"ac6b59b6b383a852ba5c22df777f9c3f39a85364a485bcc4203ca427417cb25b",
"powerpc64-unknown-linux-gnu-0.5.16":
"1ff9c39c6660548aa69934a25c8d92ffb11a7c9c1f39db9795e9f061ff34a8bd",
"powerpc64le-unknown-linux-gnu-0.5.16":
"87c568a126d59d66b99ec087182f4cd9de336678dfb60c51da35d678160875d6",
"s390x-unknown-linux-gnu-0.5.16":
"23c8331689d99c6fb70646a41a9d8ef5211d4eefe25baebb08b6b6c7f126af6e",
"x86_64-apple-darwin-0.5.16":
"72732a379d2aff6585c6bfd52593042a470e752d6af685cc01e1ee06d817cddb",
"x86_64-pc-windows-msvc-0.5.16":
"3fe298d7b10b63e9cec6711d03853874735f1dd33f655ad3ee6677965807883f",
"x86_64-unknown-linux-gnu-0.5.16":
"a320393232ac29acfe75cd0d3fb943ee2a5cc3727d2c9d1bb14bb9eea1fc60c9",
"x86_64-unknown-linux-musl-0.5.16":
"82962a1ef9ca888c32933fe9022c4b946e9bf047ffb0084a614b8cf7a5306dbf",
"aarch64-apple-darwin-0.5.15":
"bb7409c4d7d503e929bcd31bf179ae6f555f5092d0d5dc38df37be9f29832859",
"aarch64-unknown-linux-gnu-0.5.15":
"02f69686d0e1fe9673bb449fc45e53e6bfb0f48c5d371b35c145828c4239f123",
"aarch64-unknown-linux-musl-0.5.15":
"78ac5d4c7b9773bb3f6867f452ed83dd2f38f26116d2369ff5b4ea02eb7519bd",
"arm-unknown-linux-musleabihf-0.5.15":
"f416a9350161feacc48a96f90a1a38244d70f3ba07fbf96010ed477ff69814ed",
"armv7-unknown-linux-gnueabihf-0.5.15":
"182c316f44df157979e7430fb952eced1ad8020d1d8d810e88ce6985c9428615",
"armv7-unknown-linux-musleabihf-0.5.15":
"0b4400e8c22921355d5e69cf17cb0a44da93af09125e1dc636a69d2175a23898",
"i686-pc-windows-msvc-0.5.15":
"9092e142ce3a35f8c9f36058c3278f6b99718c02d8b904001ccc1cd918a0c798",
"i686-unknown-linux-gnu-0.5.15":
"d945431e618c2688ac62e640c16022c587a6f80677c64346280143d83939f93f",
"i686-unknown-linux-musl-0.5.15":
"6e1a968662a0952083e9a297ec067606621f93b55ccfbdd8ca475fd13b328d90",
"powerpc64-unknown-linux-gnu-0.5.15":
"58a6663e477645194c34dfac96b4c42ba6e7c4b5aa851c1e52276769b279b605",
"powerpc64le-unknown-linux-gnu-0.5.15":
"c7281fa8fedd6332c594faa7e1dc1555960c7fb60d3e1b013309651b8d53377d",
"s390x-unknown-linux-gnu-0.5.15":
"590751ffaf36f3f01b66afcb7de844ed0f69aeb2b54595cf191a4e60ddfab11c",
"x86_64-apple-darwin-0.5.15":
"6a729cb237d895eebeb65363419f41b217dbcd745819bcef61098a5ddd583f08",
"x86_64-pc-windows-msvc-0.5.15":
"2c49a892f793b957b0add32aa21a64940caf4bc03319cf0bb3b27caeebb985f7",
"x86_64-unknown-linux-gnu-0.5.15":
"6c650324daafc07331c00b458872d50f56f160544015c8a499fd2e160b404ebb",
"x86_64-unknown-linux-musl-0.5.15":
"40d8564e954bbd18f2c5ba80978491c3a25ab49e067664daf525e34c38a370b8",
"aarch64-apple-darwin-0.5.14":
"d548dffc256014c4c8c693e148140a3a21bcc2bf066a35e1d5f0d24c91d32112",
"aarch64-unknown-linux-gnu-0.5.14":
"1c9cdb265b0c24ce2e74b7795a00842dc6d487c11ba49aa6c9ca1c784b82755a",
"aarch64-unknown-linux-musl-0.5.14":
"64c5321f5141db39e04209d170db34fcef5c8de3f561346dc0c1d132801c4f88",
"arm-unknown-linux-musleabihf-0.5.14":
"903f87c609479099c87c229429f2a25f451689d862ee19170f6d87ab656815a0",
"armv7-unknown-linux-gnueabihf-0.5.14":
"c33a4caa441c770ca720d301059eeb6af5473ceb22b69adf08b99043c3e4a854",
"armv7-unknown-linux-musleabihf-0.5.14":
"c3b1bbe0d70e916abdd557092bf94c4830f98c471fe7d45b23d4dec8546251f3",
"i686-pc-windows-msvc-0.5.14":
"2ea709cf816b70661c6aa43d6aff7526faebafc2d45f7167d3192c5b9bb0a28f",
"i686-unknown-linux-gnu-0.5.14":
"74fd05a1e04bb8c591cb4531d517848d1e2cdc05762ccd291429c165e2a19aa1",
"i686-unknown-linux-musl-0.5.14":
"a616553164336a57fc154a424d44cd75eb06104bc4e69f3d757e3da90a90d31f",
"powerpc64-unknown-linux-gnu-0.5.14":
"4b675ac963f4d90034f8b8de8b03e0691b7e48eb8ce7bf5449ea65774750dfd4",
"powerpc64le-unknown-linux-gnu-0.5.14":
"2a7bb1d27a6a057cbd5f62a5bc2ec77175c71224de8fb1bb5107acb1a07cc02a",
"s390x-unknown-linux-gnu-0.5.14":
"68acbfadd9e100b69b31f4995265b716465df909a7d110bba76d93e8adc3a76b",
"x86_64-apple-darwin-0.5.14":
"8caf91b936ede1167abaebae07c2a1cbb22473355fa0ad7ebb2580307e84fb47",
"x86_64-pc-windows-msvc-0.5.14":
"ee2468e40320a0a2a36435e66bbd0d861228c4c06767f22d97876528138f4ba0",
"x86_64-unknown-linux-gnu-0.5.14":
"22034760075b92487b326da5aa1a2a3e1917e2e766c12c0fd466fccda77013c7",
"x86_64-unknown-linux-musl-0.5.14":
"e1ccdfe1691c1f791d84bb6e1697e49416ca4b62103dcdf3b63772f03834f113",
"aarch64-apple-darwin-0.5.13":
"8a1ddbe5131c50cbf5247f2f335252d14767a7ff74f08c8a1813f003bc86d37f",
"aarch64-unknown-linux-gnu-0.5.13":
"d0054db9ba0ec472ee6d28fa3eda94fb021b5e77c962f3bb1ff4b4fa7934e66d",
"aarch64-unknown-linux-musl-0.5.13":
"fcbc405bdf8f6edf25818b756af702e8161528f4317d65310d9a0d4e02d7f544",
"arm-unknown-linux-musleabihf-0.5.13":
"ba382034294dffcbe36d4a299a5c69c4f48caac9c4b78a1727c7fc9101175202",
"armv7-unknown-linux-gnueabihf-0.5.13":
"cc28eeaa29b85f17c27cefe96497b3448024e14b5bc92921e1b7d157375d2334",
"armv7-unknown-linux-musleabihf-0.5.13":
"449b680c4a3d936e9005e39983208a183e0fffa62fe73e6daed85f51389fc40e",
"i686-pc-windows-msvc-0.5.13":
"c1531c2f1eb8c36b2947abf039caf1aeba4253c3c35716705ca339a0a3d96594",
"i686-unknown-linux-gnu-0.5.13":
"35b964c75699b6569d950fb39561146b830101403c9a937ace1fc64fc1967c1b",
"i686-unknown-linux-musl-0.5.13":
"a33007ed60d67fa4c5b7689c1adb33751a5c1a8732057ed84b9deddbb39cd3a6",
"powerpc64-unknown-linux-gnu-0.5.13":
"9e34fc400e51f3331452083dd5e54fadc0f3be81f7901772366faf4c75e2680b",
"powerpc64le-unknown-linux-gnu-0.5.13":
"ee01812f102379bc9bb6ea991f81536c9546a5f0d4990b9ed1fbb1900cb5f647",
"s390x-unknown-linux-gnu-0.5.13":
"f43c42318411ff5f3e8ea4be2228e71fb28b01ffcc08259bb301877c7f7155e0",
"x86_64-apple-darwin-0.5.13":
"f871b2b002b750438e5e6df4b0809a9f7d089bc5d4d0466bc63577c9ecc59979",
"x86_64-pc-windows-msvc-0.5.13":
"c8a2e7e8bd87866fd1d52dbd4b4c0d85f328a6dcdeff17b85cc9c9af447ef3c3",
"x86_64-unknown-linux-gnu-0.5.13":
"0127da50d3c361d094545aab32921bbce856b3fcc24f1d10436a6426b3f16330",
"x86_64-unknown-linux-musl-0.5.13":
"1afaef0180a6b9fe43fa6658443796b8e235fc41382a451634515890cf3aca06",
"aarch64-apple-darwin-0.5.12":
"9eb8e0d3487f5389bec2c60cea37bb0a4d028513bffe854b9ece82d538c0f312",
"aarch64-unknown-linux-gnu-0.5.12":
"ed8b4928a148365a84133ce96344fc22ac62674db2c6bef88853d0e38791e8d8",
"aarch64-unknown-linux-musl-0.5.12":
"3ce19d81232cd2dcc2646060370a1583ca5558e7f61d934ae22798006719341d",
"arm-unknown-linux-musleabihf-0.5.12":
"744409cd0b7f6314b8ba140cb63f72e2576dfec5c83491d12455775d870d508d",
"armv7-unknown-linux-gnueabihf-0.5.12":
"452f8b769818858c3343444396d270d34026f0f7649cc89c4076ecdc8eb6d391",
"armv7-unknown-linux-musleabihf-0.5.12":
"35abf5e98f2c9a8250045a58a568086f0e223be703c090134bedaf6279ebaac5",
"i686-pc-windows-msvc-0.5.12":
"04f91508e6aeb7a2054e98552ff537b9863afbcbd4f72ba8bf8d9e9e25b37808",
"i686-unknown-linux-gnu-0.5.12":
"38c8fbdb74ee9eb95ecdb4b843d9014d47214cdf5415520378161979d1b0cb34",
"i686-unknown-linux-musl-0.5.12":
"6a8bb35f83c2a66711da3cee8d939e8893b34b25ae6cb53590c111637a93d527",
"powerpc64-unknown-linux-gnu-0.5.12":
"d1477f41b919c60d10a191bd81aeec0185cec7efb0364d9689b202b3a6607912",
"powerpc64le-unknown-linux-gnu-0.5.12":
"12629950b444487c66a3a99f0ff0f82f11a7b0a57e8305b2767eed5b85a4a3bb",
"s390x-unknown-linux-gnu-0.5.12":
"36fc6d9ee6294ce54a2e3e92f10df094bebdd2862c29223bde18361aad9a9f1d",
"x86_64-apple-darwin-0.5.12":
"78f38c88bf5e410600cd8f8ee4d5ba3ee781c94c091b1a57566256a2178ef4a3",
"x86_64-pc-windows-msvc-0.5.12":
"04b45a4af12c0bb7cc31004dfcfed2e722c4ca07e1ac58850f93a9343dd5d06f",
"x86_64-unknown-linux-gnu-0.5.12":
"65b8dcf3f3e592887fae0daf1b3a9e3aad1262f74bb21cf80d1700c7caba7f23",
"x86_64-unknown-linux-musl-0.5.12":
"bd517e6508feef0261289b16c844c377127f21377c18c4a564d0d09add556fca",
"aarch64-apple-darwin-0.5.11":
"695f3640d5b1a4e28de7e36e3a2e14072852dcc6c70bf9e4deec6ada00d516b4",
"aarch64-unknown-linux-gnu-0.5.11":

View File

@@ -18,12 +18,16 @@ import {
checkSum,
enableCache,
githubToken,
pyProjectFile,
pythonVersion,
toolBinDir,
toolDir,
version,
uvFile,
version as versionInput,
} from "./utils/inputs";
import * as exec from "@actions/exec";
import fs from "node:fs";
import { getUvVersionFromConfigFile } from "./utils/pyproject";
async function run(): Promise<void> {
const platform = getPlatform();
@@ -36,13 +40,7 @@ async function run(): Promise<void> {
if (arch === undefined) {
throw new Error(`Unsupported architecture: ${process.arch}`);
}
const setupResult = await setupUv(
platform,
arch,
version,
checkSum,
githubToken,
);
const setupResult = await setupUv(platform, arch, checkSum, githubToken);
addUvToPath(setupResult.uvDir);
addToolBinToPath();
@@ -55,7 +53,7 @@ async function run(): Promise<void> {
core.info(`Successfully installed uv version ${setupResult.version}`);
if (enableCache) {
await restoreCache(setupResult.version);
await restoreCache();
}
process.exit(0);
} catch (err) {
@@ -66,11 +64,10 @@ async function run(): Promise<void> {
async function setupUv(
platform: Platform,
arch: Architecture,
versionInput: string,
checkSum: string | undefined,
githubToken: string,
): Promise<{ uvDir: string; version: string }> {
const resolvedVersion = await resolveVersion(versionInput, githubToken);
const resolvedVersion = await determineVersion();
const toolCacheResult = tryGetFromToolCache(arch, resolvedVersion);
if (toolCacheResult.installedPath) {
core.info(`Found uv in tool-cache for ${toolCacheResult.version}`);
@@ -94,6 +91,28 @@ async function setupUv(
};
}
async function determineVersion(): Promise<string> {
if (versionInput !== "") {
return await resolveVersion(versionInput, githubToken);
}
const configFile = uvFile !== "" ? uvFile : pyProjectFile;
if (configFile !== "") {
const versionFromConfigFile = getUvVersionFromConfigFile(configFile);
if (versionFromConfigFile === undefined) {
core.warning(
`Could not find required-version under [tool.uv] in ${configFile}. Falling back to latest`,
);
}
return await resolveVersion(versionFromConfigFile || "latest", githubToken);
}
if (!fs.existsSync("uv.toml") && !fs.existsSync("pyproject.toml")) {
return await resolveVersion("latest", githubToken);
}
const versionFile = fs.existsSync("uv.toml") ? "uv.toml" : "pyproject.toml";
const versionFromConfigFile = getUvVersionFromConfigFile(versionFile);
return await resolveVersion(versionFromConfigFile || "latest", githubToken);
}
function addUvToPath(cachedPath: string): void {
core.addPath(cachedPath);
core.info(`Added ${cachedPath} to the path`);
@@ -142,8 +161,8 @@ async function setupPython(): Promise<void> {
if (process.platform === "win32") {
venvBinPath = ".venv/Scripts";
}
core.addPath(venvBinPath);
core.exportVariable("VIRTUAL_ENV", venvBinPath);
core.addPath(path.resolve(venvBinPath));
core.exportVariable("VIRTUAL_ENV", path.resolve(".venv"));
}
}

View File

@@ -2,6 +2,8 @@ import * as core from "@actions/core";
import path from "node:path";
export const version = core.getInput("version");
export const pyProjectFile = core.getInput("pyproject-file");
export const uvFile = core.getInput("uv-file");
export const pythonVersion = core.getInput("python-version");
export const checkSum = core.getInput("checksum");
export const enableCache = getEnableCache();

38
src/utils/pyproject.ts Normal file
View File

@@ -0,0 +1,38 @@
import fs from "node:fs";
import * as core from "@actions/core";
import * as toml from "smol-toml";
export function getUvVersionFromConfigFile(
filePath: string,
): string | undefined {
if (!fs.existsSync(filePath)) {
core.warning(`Could not find file: ${filePath}`);
return undefined;
}
let requiredVersion = getRequiredVersion(filePath);
if (requiredVersion?.startsWith("==")) {
requiredVersion = requiredVersion.slice(2);
}
if (requiredVersion !== undefined) {
core.info(
`Found required-version for uv in ${filePath}: ${requiredVersion}`,
);
}
return requiredVersion;
}
function getRequiredVersion(filePath: string): string | undefined {
const fileContent = fs.readFileSync(filePath, "utf-8");
if (filePath.endsWith("pyproject.toml")) {
const tomlContent = toml.parse(fileContent) as {
tool?: { uv?: { "required-version"?: string } };
};
return tomlContent?.tool?.uv?.["required-version"];
}
const tomlContent = toml.parse(fileContent) as {
"required-version"?: string;
};
return tomlContent["required-version"];
}

View File

@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"outDir": "./lib" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,