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

Compare commits

..

46 Commits

Author SHA1 Message Date
github-actions[bot]
c9aa747934 chore: update known checksums for 0.4.18 (#109)
chore: update known checksums for 0.4.18

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-10-02 09:37:03 +00:00
dependabot[bot]
97dc6041e9 Bump @types/node from 22.7.3 to 22.7.4 (#108)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.7.3 to 22.7.4.
<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.7.3&new-version=22.7.4)](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>
2024-10-02 09:44:49 +02:00
Charlie Marsh
c11f8674f8 Migrate to Biome for linting and formatting (#107) 2024-09-30 08:55:24 +02:00
github-actions[bot]
023eb7875f chore: update known checksums for 0.4.17 (#104)
chore: update known checksums for 0.4.17

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-27 20:26:47 +02:00
dependabot[bot]
315da29189 Bump @types/node from 22.7.0 to 22.7.3 (#103)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.7.0 to 22.7.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.7.0&new-version=22.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>
2024-09-27 13:05:44 +02:00
dependabot[bot]
4cda7d7332 Bump @types/node from 22.6.1 to 22.7.0 (#101)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.6.1 to 22.7.0.
<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.6.1&new-version=22.7.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>
2024-09-25 13:02:33 +02:00
github-actions[bot]
8114e5e81b chore: update known checksums for 0.4.16 (#100)
chore: update known checksums for 0.4.16

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-25 07:25:31 +00:00
dependabot[bot]
7ee921e18a Bump @types/node from 22.5.5 to 22.6.1 (#98)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.5.5 to 22.6.1.
<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.5.5&new-version=22.6.1)](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>
2024-09-25 09:02:25 +02:00
Kevin Stillhammer
8c3a35e468 Only log checksum is valid when it really is (#97) 2024-09-21 19:10:22 +00:00
Kevin Stillhammer
abac0ce7b0 Use runner label selfhosted-ubuntu-arm64 (#96)
Replaces oracle-aarch64 to better express what the runner is used for
2024-09-21 20:19:02 +02:00
github-actions[bot]
03e245b158 chore: update known checksums for 0.4.15 (#95)
chore: update known checksums for 0.4.15

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-21 17:07:50 +02:00
Kevin Stillhammer
aeb46491c7 Set tool(-bin) dir and add to PATH (#87)
Fixes: #83
Fixes: #60
2024-09-21 10:14:36 +02:00
github-actions[bot]
dbb680fbd2 chore: update known checksums for 0.4.14 (#94)
chore: update known checksums for 0.4.14

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-20 21:53:28 +00:00
github-actions[bot]
8de9ba90a2 chore: update known checksums for 0.4.13 (#93)
chore: update known checksums for 0.4.13

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-19 21:30:53 +00:00
dependabot[bot]
118bd876d2 Bump peter-evans/create-pull-request from 7.0.3 to 7.0.5 (#91)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.3 to 7.0.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v7.0.5</h2>
<p>⚙️ Fixes an issue with commit signing to allow it to support
symlinks</p>
<h2>What's Changed</h2>
<ul>
<li>fix: support symlinks when commit signing by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3359">peter-evans/create-pull-request#3359</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.4...v7.0.5">https://github.com/peter-evans/create-pull-request/compare/v7.0.4...v7.0.5</a></p>
<h2>Create Pull Request v7.0.4</h2>
<p>⚙️ Fixes an issue with commit signing to allow it to support
submodules</p>
<h2>What's Changed</h2>
<ul>
<li>docs: correct suggestion for bot setup by <a
href="https://github.com/henryiii"><code>@​henryiii</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3342">peter-evans/create-pull-request#3342</a></li>
<li>build(deps-dev): bump <code>@​types/jest</code> from 29.5.12 to
29.5.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3343">peter-evans/create-pull-request#3343</a></li>
<li>build(deps-dev): bump eslint from 8.57.0 to 8.57.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3344">peter-evans/create-pull-request#3344</a></li>
<li>fix: support submodules when commit signing by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3354">peter-evans/create-pull-request#3354</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/henryiii"><code>@​henryiii</code></a>
made their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3342">peter-evans/create-pull-request#3342</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.3...v7.0.4">https://github.com/peter-evans/create-pull-request/compare/v7.0.3...v7.0.4</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5e914681df"><code>5e91468</code></a>
fix: support symlinks when commit signing (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3359">#3359</a>)</li>
<li><a
href="2f38cd26bf"><code>2f38cd2</code></a>
fix: support submodules when commit signing (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3354">#3354</a>)</li>
<li><a
href="7a8aeac749"><code>7a8aeac</code></a>
build(deps-dev): bump eslint from 8.57.0 to 8.57.1 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3344">#3344</a>)</li>
<li><a
href="d39d596a77"><code>d39d596</code></a>
build(deps-dev): bump <code>@​types/jest</code> from 29.5.12 to 29.5.13
(<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3343">#3343</a>)</li>
<li><a
href="f6f978fd3d"><code>f6f978f</code></a>
docs: correct suggestion for bot setup (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3342">#3342</a>)</li>
<li>See full diff in <a
href="6cd32fd936...5e914681df">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=7.0.3&new-version=7.0.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>
2024-09-19 18:40:01 +02:00
Bartosz Sławecki
adcf5c892e Fix a typo SHA265 → SHA256 (#90)
:)
2024-09-19 09:10:29 +00:00
github-actions[bot]
0c326cbd51 chore: update known checksums for 0.4.12 (#86)
chore: update known checksums for 0.4.12

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-18 18:53:44 +02:00
Kevin Stillhammer
8205eab75b Update version in README from v2 to v3 (#85) 2024-09-18 09:34:56 +00:00
Kevin Stillhammer
ce0062aac7 Add support for semver version ranges (#82)
Closes: #38
2024-09-18 09:29:09 +00:00
github-actions[bot]
8e09161b4b chore: update known checksums for 0.4.11 (#84)
chore: update known checksums for 0.4.11

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-18 07:23:29 +00:00
dependabot[bot]
bf2778f5d6 Bump eslint from 8.57.0 to 8.57.1 (#81) 2024-09-17 23:20:41 -04:00
Charlie Marsh
223591d242 Tweak the action branding (#49) 2024-09-17 23:20:15 -04:00
Kevin Stillhammer
79fb68ebfe Fix prettier destroying markdown NOTE (#80) 2024-09-17 08:27:37 +02:00
Kevin Stillhammer
9f1f1fece2 Run prettier (#78) 2024-09-16 19:33:16 +00:00
dependabot[bot]
6343f7c79b Bump eslint-plugin-github from 5.0.1 to 5.0.2 (#69)
Bumps
[eslint-plugin-github](https://github.com/github/eslint-plugin-github)
from 5.0.1 to 5.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/eslint-plugin-github/releases">eslint-plugin-github's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.2</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(deps): bump the all-dependencies group across 1 directory with
3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/533">github/eslint-plugin-github#533</a></li>
<li>chore(deps): bump braces from 3.0.2 to 3.0.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/534">github/eslint-plugin-github#534</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/535">github/eslint-plugin-github#535</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/536">github/eslint-plugin-github#536</a></li>
<li>chore(deps): bump the all-dependencies group with 4 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/537">github/eslint-plugin-github#537</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/538">github/eslint-plugin-github#538</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/540">github/eslint-plugin-github#540</a></li>
<li>chore(deps): bump the all-dependencies group with 4 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/541">github/eslint-plugin-github#541</a></li>
<li>chore(deps): bump the all-dependencies group across 1 directory with
3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/543">github/eslint-plugin-github#543</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/544">github/eslint-plugin-github#544</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/545">github/eslint-plugin-github#545</a></li>
<li>chore(deps): bump the all-dependencies group across 1 directory with
4 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/551">github/eslint-plugin-github#551</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2">https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d6f656d78f"><code>d6f656d</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/551">#551</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li><a
href="df2c60a624"><code>df2c60a</code></a>
chore(deps): bump the all-dependencies group across 1 directory with 4
updates</li>
<li><a
href="0f0979cb38"><code>0f0979c</code></a>
chore(deps): bump the all-dependencies group with 3 updates (<a
href="https://redirect.github.com/github/eslint-plugin-github/issues/545">#545</a>)</li>
<li><a
href="0e294e5c4d"><code>0e294e5</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/544">#544</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li><a
href="17c6e39aa4"><code>17c6e39</code></a>
chore(deps): bump the all-dependencies group with 3 updates</li>
<li><a
href="86d5cb1324"><code>86d5cb1</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/543">#543</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li><a
href="522309f8d0"><code>522309f</code></a>
chore(deps): bump the all-dependencies group across 1 directory with 3
updates</li>
<li><a
href="c3857ba01e"><code>c3857ba</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/541">#541</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li><a
href="8010f55226"><code>8010f55</code></a>
chore(deps): bump the all-dependencies group with 4 updates</li>
<li><a
href="777227525b"><code>7772275</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/540">#540</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li>Additional commits viewable in <a
href="https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-plugin-github&package-manager=npm_and_yarn&previous-version=5.0.1&new-version=5.0.2)](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>
2024-09-16 21:12:54 +02:00
dependabot[bot]
bfea2a2a76 Bump typescript from 5.5.4 to 5.6.2 (#64)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4
to 5.6.2.
<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.6</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.6.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.6.0 (Beta)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.6.1%22+is%3Aclosed+">fixed
issues query for Typescript 5.6.1 (RC)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.6.2%22+is%3Aclosed+">fixed
issues query for Typescript 5.6.2 (Stable)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
<li><a
href="https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild">NuGet
package</a></li>
</ul>
<h2>TypeScript 5.6 RC</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-6-rc/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;milestone%3A%22TypeScript+5.6.1%22+is%3Aclosed+">fixed
issues query for TypeScript v5.6.1 (RC)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;milestone%3A%22TypeScript+5.6.0%22+is%3Aclosed+">fixed
issues query for TypeScript v5.6.0 (Beta)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
</ul>
<h2>TypeScript 5.6 Beta</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-6-beta/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.6.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.6.0 (Beta)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
<li><a
href="https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild">NuGet
package</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a7e3374f13"><code>a7e3374</code></a>
Bump version to 5.6.2 and LKG</li>
<li><a
href="20633579fc"><code>2063357</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/59708">#59708</a>
(LEGO: Pull request from lego/hb_537...) into release-5.6 (#...</li>
<li><a
href="4fe7e41ea1"><code>4fe7e41</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/59670">#59670</a>
(fix(59649): ts Move to a new file d...) into release-5.6 (#...</li>
<li><a
href="1a03e5340a"><code>1a03e53</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/59761">#59761</a>
(<code>this</code> can be nullish) into release-5.6 (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/59762">#59762</a>)</li>
<li><a
href="6212132b83"><code>6212132</code></a>
Update LKG</li>
<li><a
href="bbb5faf7e7"><code>bbb5faf</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/59542">#59542</a>
(Fixing delay caused in vscode due t...) into release-5.6 (#...</li>
<li><a
href="e6914a5587"><code>e6914a5</code></a>
Bump version to 5.6.1-rc and LKG</li>
<li><a
href="34121c42b6"><code>34121c4</code></a>
Update LKG</li>
<li><a
href="2a30c2a8f0"><code>2a30c2a</code></a>
Merge remote-tracking branch 'origin/main' into release-5.6</li>
<li><a
href="936a79bbb5"><code>936a79b</code></a>
Expose TypeChecker. getAwaitedType to public (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/59268">#59268</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2">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.5.4&new-version=5.6.2)](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>
2024-09-16 21:12:39 +02:00
Kevin Stillhammer
8d65000ec9 Set the cache-dependency-glob default to **/uv.lock (#77)
We should aim for a solution with sane defaults that work as most users
would expect it.

The current default leads to a cache that is never invalidated and thus
never updated.

This also mirrors the default behaviors for setup-python which use
`**/requirements.txt`, `**/Pipfile.lock` or `**/poetry.lock`

Also make it clear that the uv cache on the filesystem can be uploaded to the GitHub Actions cache, but they are distinct things.

Also make it clear that the local cache path can be changed without using `enable-cache: true`
2024-09-16 21:08:44 +02:00
Kevin Stillhammer
4456fa154a Add .idea files to gitignore (#76) 2024-09-16 13:05:47 +00:00
dependabot[bot]
8af341e206 Bump @types/node from 22.5.4 to 22.5.5 (#74)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.5.4 to 22.5.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.5.4&new-version=22.5.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>
2024-09-16 14:57:20 +02:00
dependabot[bot]
6beca84284 Bump peter-evans/create-pull-request from 7.0.2 to 7.0.3 (#75)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.2 to 7.0.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v7.0.3</h2>
<p>⚙️ Fixes an issue with commit signing where commit SHAs have variable
lengths when abbreviated.</p>
<h2>What's Changed</h2>
<ul>
<li>fix: disable abbreviated commit shas in diff by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3337">peter-evans/create-pull-request#3337</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.2...v7.0.3">https://github.com/peter-evans/create-pull-request/compare/v7.0.2...v7.0.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6cd32fd936"><code>6cd32fd</code></a>
fix: disable abbreviated commit shas in diff (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3337">#3337</a>)</li>
<li>See full diff in <a
href="d121e62763...6cd32fd936">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=7.0.2&new-version=7.0.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>
2024-09-16 14:53:59 +02:00
github-actions[bot]
6dfebec6dd chore: update known checksums for 0.4.10 (#72)
chore: update known checksums for 0.4.10

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-13 19:15:03 +00:00
dependabot[bot]
756f81db94 Bump peter-evans/create-pull-request from 7.0.1 to 7.0.2 (#71)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.1 to 7.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v7.0.2</h2>
<p>⚙️ Fixes an issue with commit signing when a change was detected as
being a rename or copy.</p>
<h2>What's Changed</h2>
<ul>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.48 to
18.19.50 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3320">peter-evans/create-pull-request#3320</a></li>
<li>build(deps-dev): bump typescript from 5.5.4 to 5.6.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3319">peter-evans/create-pull-request#3319</a></li>
<li>fix: disable diff detection for renames and copies by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3330">peter-evans/create-pull-request#3330</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.1...v7.0.2">https://github.com/peter-evans/create-pull-request/compare/v7.0.1...v7.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d121e62763"><code>d121e62</code></a>
fix: disable diff detection for renames and copies (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3330">#3330</a>)</li>
<li><a
href="f4d66f4d5a"><code>f4d66f4</code></a>
build(deps-dev): bump typescript from 5.5.4 to 5.6.2 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3319">#3319</a>)</li>
<li><a
href="488c869d17"><code>488c869</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.48 to
18.19.50 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3320">#3320</a>)</li>
<li><a
href="5354f85616"><code>5354f85</code></a>
docs: update readme</li>
<li>See full diff in <a
href="8867c4aba1...d121e62763">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=7.0.1&new-version=7.0.2)](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>
2024-09-13 16:17:03 +02:00
hori-ryota
8e854494e0 fix example for multiple cache-dependency-glob without quote (#67) 2024-09-12 14:58:45 +02:00
github-actions[bot]
d70817ce85 chore: update known checksums for 0.4.9 (#65)
chore: update known checksums for 0.4.9

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-11 10:08:52 +00:00
Lukas Burgholzer
49df72dfcf 🚸 use GitHub token by default (#61)
This PR adjusts the action so that it is no longer necessary to
explicitly specify the GitHub token to circumvent the API rate limit.
To this end, it simply passes the repository's GitHub token (available
via `${{ github.token }}`) as a default for the `github_token` action
input.

This is similar to how this is handled in, e.g.,
https://github.com/peter-evans/create-pull-request; specifically
[here](5354f85616/action.yml (L4-L6)).
2024-09-11 08:18:23 +00:00
github-actions[bot]
89ebbb66d2 chore: update known checksums for 0.4.8 (#62)
chore: update known checksums for 0.4.8

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-10 09:54:20 +00:00
Kevin Stillhammer
b463f5b8ca rename utils/utils.ts to constants.ts (#59) 2024-09-07 12:13:50 +00:00
Kevin Stillhammer
417c97acee Use D:\a\_tmp\setup-uv-cache as default cacheLocalPath on Windows (#57)
Fixes: #52
2024-09-07 14:11:25 +02:00
github-actions[bot]
4beb0eca42 chore: update known checksums for 0.4.7 (#58)
chore: update known checksums for 0.4.7

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-07 09:47:36 +00:00
dependabot[bot]
428055c3da Bump peter-evans/create-pull-request from 7.0.0 to 7.0.1 (#56)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.0 to 7.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v7.0.1</h2>
<p>⚙️ Fixes <a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3311">an
issue</a> affecting one particular use case where the action fails on
<code>diff --stat</code> with <code>fatal: ambiguous
argument</code>.</p>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump peter-evans/create-pull-request from 6 to 7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3283">peter-evans/create-pull-request#3283</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.46 to
18.19.48 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3288">peter-evans/create-pull-request#3288</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
7.17.0 to 7.18.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3289">peter-evans/create-pull-request#3289</a></li>
<li>build(deps-dev): bump eslint-plugin-import from 2.29.1 to 2.30.0 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3290">peter-evans/create-pull-request#3290</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 7.17.0 to 7.18.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3291">peter-evans/create-pull-request#3291</a></li>
<li>fix: handle ambiguous argument failure on diff stat by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3312">peter-evans/create-pull-request#3312</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.0...v7.0.1">https://github.com/peter-evans/create-pull-request/compare/v7.0.0...v7.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8867c4aba1"><code>8867c4a</code></a>
fix: handle ambiguous argument failure on diff stat (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3312">#3312</a>)</li>
<li><a
href="6073f5434b"><code>6073f54</code></a>
build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3291">#3291</a>)</li>
<li><a
href="6d01b5601c"><code>6d01b56</code></a>
build(deps-dev): bump eslint-plugin-import from 2.29.1 to 2.30.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3290">#3290</a>)</li>
<li><a
href="25cf8451c3"><code>25cf845</code></a>
build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
7.17.0 to 7.18.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3289">#3289</a>)</li>
<li><a
href="d87b980a0e"><code>d87b980</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.46 to
18.19.48 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3288">#3288</a>)</li>
<li><a
href="119d131ea9"><code>119d131</code></a>
build(deps): bump peter-evans/create-pull-request from 6 to 7 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3283">#3283</a>)</li>
<li><a
href="73e6230af4"><code>73e6230</code></a>
docs: update readme</li>
<li><a
href="c0348e860f"><code>c0348e8</code></a>
ci: add v7 to workflow</li>
<li>See full diff in <a
href="4320041ed3...8867c4aba1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=7.0.0&new-version=7.0.1)](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>
2024-09-06 14:47:10 +02:00
Hynek Schlawack
20d812c7a3 Update README to v2 (#50) 2024-09-06 14:46:33 +02:00
Kevin Stillhammer
d9a2b6b6fa Support a list of cache-dependency-glob (#41)
Closes: #40

Because of build conflics (forgot to run `npm i` after pulling) I
deleted the `dist`folder to start fresh. Turns out that it still
contained the source maps from the very first commit. I removed the
argument to generate those a long time ago
2024-09-06 14:44:31 +02:00
github-actions[bot]
606b0d67da chore: update known checksums for 0.4.6 (#55)
chore: update known checksums for 0.4.6

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-06 13:31:10 +02:00
Kevin Stillhammer
67736b0f01 Always run check-dist check (#53)
Currently we mark it as a required check and thus prevent automatic PR
merges when only markdown files are contained in the PR
2024-09-06 13:07:34 +02:00
github-actions[bot]
fc672aa0a3 chore: update known checksums for 0.4.5 (#48)
chore: update known checksums for 0.4.5

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-06 09:30:10 +02:00
Kevin Stillhammer
79643936e1 Run test build only on ubuntu-latest (#51)
It is unnecessary to test this on several OS. This is done by the actual
action tests in other jobs.
2024-09-06 09:19:26 +02:00
42 changed files with 5806 additions and 76945 deletions

View File

@@ -1,4 +0,0 @@
dist/
lib/
node_modules/
jest.config.js

View File

@@ -1,61 +0,0 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ "accessibility": "no-public" }
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{ "allowExpressions": true }
],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}

View File

@@ -9,11 +9,7 @@ on:
push:
branches:
- main
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:
jobs:

View File

@@ -48,8 +48,48 @@ jobs:
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-setup-cache-dependency-glob:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup with cache
uses: ./
with:
enable-cache: true
cache-dependency-glob: |
__tests__/fixtures/uv-project/uv.lock
**/pyproject.toml
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-restore-cache-dependency-glob:
runs-on: ubuntu-latest
needs: test-setup-cache-dependency-glob
steps:
- uses: actions/checkout@v4
- name: Change pyproject.toml
run: |
echo '[tool.uv]' >> __tests__/fixtures/uv-project/pyproject.toml
echo 'dev-dependencies = []' >> __tests__/fixtures/uv-project/pyproject.toml
- name: Restore with cache
id: restore
uses: ./
with:
enable-cache: true
cache-dependency-glob: |
__tests__/fixtures/uv-project/uv.lock
**/pyproject.toml
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
- name: Cache was not hit
run: |
if [ "$CACHE_HIT" == "true" ]; then
exit 1
fi
env:
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
test-setup-cache-local:
runs-on: oracle-aarch64
runs-on: selfhosted-ubuntu-arm64
steps:
- uses: actions/checkout@v4
- name: Setup with cache
@@ -61,7 +101,7 @@ jobs:
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-restore-cache-local:
runs-on: oracle-aarch64
runs-on: selfhosted-ubuntu-arm64
needs: test-setup-cache-local
steps:
- uses: actions/checkout@v4

View File

@@ -23,7 +23,5 @@ jobs:
}
- name: Setup uv
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__\fixtures\uv-project

View File

@@ -11,10 +11,7 @@ concurrency:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, oracle-aarch64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
@@ -24,46 +21,65 @@ jobs:
npm install
- run: |
npm run all
- name: Make sure no changes from linters are detected
run: |
git diff --exit-code
test-default-version:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, oracle-aarch64]
os: [ubuntu-latest, macos-latest, macos-14, selfhosted-ubuntu-arm64]
steps:
- uses: actions/checkout@v4
- name: Install default version
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-specific-version:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, oracle-aarch64]
uv-version: ["latest", "0.3.0", "0.3.2"]
os: [ubuntu-latest, macos-latest, macos-14, selfhosted-ubuntu-arm64]
uv-version: ["latest", "0.3.0", "0.3.2", "0.3", "0.3.x", ">=0.3.0"]
steps:
- uses: actions/checkout@v4
- name: Install version ${{ matrix.uv-version }}
uses: ./
with:
version: ${{ matrix.uv-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-semver-range:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, selfhosted-ubuntu-arm64]
steps:
- uses: actions/checkout@v4
- name: Install version 0.3
id: setup-uv
uses: ./
with:
version: "0.3"
- name: Correct version gets installed
run: |
if [ "$UV_VERSION" != "0.3.5" ]; then
exit 1
fi
env:
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
test-checksum:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, oracle-aarch64]
os: [ubuntu-latest, selfhosted-ubuntu-arm64]
checksum:
["4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd"]
exclude:
- os: oracle-aarch64
- os: selfhosted-ubuntu-arm64
checksum: "4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd"
include:
- os: oracle-aarch64
- os: selfhosted-ubuntu-arm64
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
steps:
- uses: actions/checkout@v4
@@ -72,16 +88,16 @@ jobs:
with:
version: "0.3.2"
checksum: ${{ matrix.checksum }}
github-token: ${{ secrets.GITHUB_TOKEN }}
test-without-github-token:
test-with-explicit-token:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install default version
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-uvx:
runs-on: ubuntu-latest
steps:
@@ -89,3 +105,21 @@ jobs:
- name: Install default version
uses: ./
- run: uvx ruff --version
test-tool-install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
[
ubuntu-latest,
macos-latest,
macos-14,
windows-latest,
selfhosted-ubuntu-arm64,
]
steps:
- uses: actions/checkout@v4
- name: Install default version
uses: ./
- run: uv tool install ruff
- run: ruff --version

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@4320041ed380b20e97d388d56a7fb4f9b8c20e79 # v7.0.0
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
commit-message: "chore: update known checksums"
title:

5
.gitignore vendored
View File

@@ -96,4 +96,7 @@ Thumbs.db
# Ignore built ts files
__tests__/runner/*
lib/**/*
lib/**/*
# Idea IDEs (PyCharm, WebStorm, IntelliJ, etc)
.idea/

View File

@@ -1,3 +0,0 @@
dist/
lib/
node_modules/

View File

@@ -1,4 +0,0 @@
{
"trailingComma": "all",
"proseWrap": "always"
}

169
README.md
View File

@@ -11,13 +11,16 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
## Contents
- [Usage](#usage)
- [Install specific version](#install-specific-version)
- [Install latest version](#install-latest-version)
- [Install the latest version (default)](#install-the-latest-version-default)
- [Install a specific version](#install-a-specific-version)
- [Install a version by supplying a semver range](#install-a-version-by-supplying-a-semver-range)
- [Validate checksum](#validate-checksum)
- [Enable Caching](#enable-caching)
- [Local cache path](#local-cache-path)
- [Cache dependency glob](#cache-dependency-glob)
- [API rate limit](#api-rate-limit)
- [Local cache path](#local-cache-path)
- [GitHub authentication token](#github-authentication-token)
- [UV_TOOL_DIR](#uv_tool_dir)
- [UV_TOOL_BIN_DIR](#uv_tool_bin_dir)
- [How it works](#how-it-works)
- [FAQ](#faq)
@@ -27,7 +30,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@v3
with:
version: "latest"
```
@@ -45,20 +48,39 @@ For an example workflow, see
```yaml
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@v3
with:
version: "0.4.4"
```
### Install a version by supplying a semver range
You can also specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
to install the latest version that satisfies the range.
```yaml
- name: Install a semver range of uv
uses: astral-sh/setup-uv@v3
with:
version: ">=0.3.0"
```
```yaml
- name: Pinning a minor version of uv
uses: astral-sh/setup-uv@v3
with:
version: "0.3.x"
```
### Validate checksum
You can also specify a checksum to validate the downloaded file. Checksums up to the default version
are automatically verified by this action. The sha265 hashes can be found on the
are automatically verified by this action. The sha256 hashes can be found on the
[releases page](https://github.com/astral-sh/uv/releases) of the uv repo.
```yaml
- name: Install a specific version and validate the checksum
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@v3
with:
version: "0.3.1"
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
@@ -67,15 +89,19 @@ are automatically verified by this action. The sha265 hashes can be found on the
### Enable caching
If you enable caching, the [uv cache](https://docs.astral.sh/uv/concepts/cache/) will be cached to
the GitHub Actions Cache. This can speed up runs that reuse the cache by several minutes. The cache
will always be reused on self-hosted runners.
the GitHub Actions Cache. This can speed up runs that reuse the cache by several minutes.
> [!TIP]
>
> On self-hosted runners this is usually not needed since the cache generated by uv on the runner's
> filesystem is not removed after a run. For more details see [Local cache path](#local-cache-path).
You can optionally define a custom cache key suffix.
```yaml
- name: Enable caching and define a custom cache key suffix
id: setup-uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-suffix: "optional-suffix"
@@ -90,51 +116,108 @@ use it in subsequent steps. For example, to use the cache in the above case:
run: echo "Cache was restored"
```
#### Local cache path
If you want to save the cache to a local path other than the default path (`/tmp/setup-uv-cache`),
specify the path with the `cache-local-path` input.
```yaml
- name: Define a custom uv cache path
uses: astral-sh/setup-uv@v1
with:
enable-cache: true
cache-local-path: "/path/to/cache"
```
#### Cache dependency glob
If you want to control when the cache is invalidated, specify a glob pattern with the
`cache-dependency-glob` input. The cache will be invalidated if any file matching the glob pattern
changes. The glob matches files relative to the repository root.
```yaml
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@v1
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
```
> [!NOTE]
>
> The default is `**/uv.lock`.
```yaml
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "**requirements*.txt"
cache-dependency-glob: "**/requirements*.txt"
```
### API rate limit
To avoid hitting the `API rate limit exceeded` error, supply a GitHub token via the `github-token`
input.
```yaml
- name: Define a list of cache dependency globs
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: |
**/requirements*.txt
**/pyproject.toml
```
```yaml
- name: Install uv and supply a GitHub token
uses: astral-sh/setup-uv@v1
- name: Never invalidate the cache
uses: astral-sh/setup-uv@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-cache: true
cache-dependency-glob: ""
```
### Local cache path
This action controls where uv stores its cache on the runner's filesystem by setting `UV_CACHE_DIR`.
It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\uv-tool-dir` on Windows and
`/tmp/setup-uv-cache` on Linux/macOS. You can change the default by specifying the path with the
`cache-local-path` input.
```yaml
- name: Define a custom uv cache path
uses: astral-sh/setup-uv@v3
with:
cache-local-path: "/path/to/cache"
```
### GitHub authentication token
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API
rate limit too quickly, an authentication token can be provided via the `github-token` input. By
default, the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
If the default
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
are not sufficient, you can provide a custom GitHub token with the necessary permissions.
```yaml
- name: Install the latest version of uv with a custom GitHub token
uses: astral-sh/setup-uv@v3
with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```
### UV_TOOL_DIR
On Windows `UV_TOOL_DIR` is set to `uv-tool-dir` in the `TMP` dir (e.g. `D:\a\_temp\uv-tool-dir`).
On GitHub hosted runners this is on the much faster `D:` drive.
On all other platforms the tool environments are placed in the
[default location](https://docs.astral.sh/uv/concepts/tools/#tools-directory).
If you want to change this behaviour (especially on self-hosted runners) you can use the `tool-dir`
input:
```yaml
- name: Install the latest version of uv with a custom tool dir
uses: astral-sh/setup-uv@v3
with:
tool-dir: "/path/to/tool/dir"
```
### UV_TOOL_BIN_DIR
On Windows `UV_TOOL_BIN_DIR` is set to `uv-tool-bin-dir` in the `TMP` dir (e.g.
`D:\a\_temp\uv-tool-bin-dir`). On GitHub hosted runners this is on the much faster `D:` drive. This
path is also automatically added to the PATH.
On all other platforms the tool binaries get installed to the
[default location](https://docs.astral.sh/uv/concepts/tools/#the-bin-directory).
If you want to change this behaviour (especially on self-hosted runners) you can use the
`tool-bin-dir` input:
```yaml
- name: Install the latest version of uv with a custom tool bin dir
uses: astral-sh/setup-uv@v3
with:
tool-bin-dir: "/path/to/tool-bin/dir"
```
## How it works
@@ -161,7 +244,7 @@ For example:
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Test
@@ -173,7 +256,7 @@ To install a specific version of Python, use
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install Python 3.12
@@ -192,7 +275,7 @@ output:
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@v1
uses: astral-sh/setup-uv@v3
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
```

View File

@@ -1,6 +1,7 @@
name: "Python setup uv"
description: "Set up your GitHub Actions workflow with a specific version of uv"
author: "eifinger"
name: "astral-sh/setup-uv"
description:
"Set up your GitHub Actions workflow with a specific version of uv."
author: "astral-sh"
inputs:
version:
description: "The version of uv to install"
@@ -13,20 +14,27 @@ inputs:
"Used to increase the rate limit when retrieving versions and downloading
uv."
required: false
default: ${{ github.token }}
enable-cache:
description: "Enable caching of the uv cache"
default: "false"
cache-dependency-glob:
description:
'Glob pattern to match files relative to the repository root to control
the cache. e.g. "uv.lock"'
required: false
"Glob pattern to match files relative to the repository root to control
the cache."
default: "**/uv.lock"
cache-suffix:
description: "Suffix for the cache key"
required: false
cache-local-path:
description: "Local path to store the cache."
default: "/tmp/setup-uv-cache"
default: ""
tool-dir:
description: "Custom path to set UV_TOOL_DIR to."
required: false
tool-bin-dir:
description: "Custom path to set UV_TOOL_BIN_DIR to."
required: false
outputs:
uv-version:
description: "The installed uv version. Useful when using latest."
@@ -39,4 +47,4 @@ runs:
post-if: success()
branding:
icon: "package"
color: "blue"
color: "black"

31
biome.json Normal file
View File

@@ -0,0 +1,31 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": ["dist", "lib", "node_modules"]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingCommas": "all"
}
}
}

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

@@ -82825,16 +82825,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.STATE_CACHE_MATCHED_KEY = exports.STATE_CACHE_KEY = void 0;
exports.restoreCache = restoreCache;
const cache = __importStar(__nccwpck_require__(7799));
const glob = __importStar(__nccwpck_require__(8090));
const core = __importStar(__nccwpck_require__(2186));
const path_1 = __importDefault(__nccwpck_require__(1017));
const inputs_1 = __nccwpck_require__(9378);
const platforms_1 = __nccwpck_require__(6005);
exports.STATE_CACHE_KEY = "cache-key";
@@ -82862,10 +82858,10 @@ function computeKeys(version) {
return __awaiter(this, void 0, void 0, function* () {
let cacheDependencyPathHash = "-";
if (inputs_1.cacheDependencyGlob !== "") {
const fullCacheDependencyGlob = `${process.env["GITHUB_WORKSPACE"]}${path_1.default.sep}${inputs_1.cacheDependencyGlob}`;
cacheDependencyPathHash += yield glob.hashFiles(fullCacheDependencyGlob);
core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`);
cacheDependencyPathHash += yield glob.hashFiles(inputs_1.cacheDependencyGlob, undefined, undefined, true);
if (cacheDependencyPathHash === "-") {
throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob}], make sure you have checked out the target repository`);
throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`);
}
}
else {
@@ -82955,7 +82951,7 @@ function saveCache() {
core.warning("Error retrieving cache key from state.");
return;
}
else if (matchedKey === cacheKey) {
if (matchedKey === cacheKey) {
core.info(`Cache hit occurred on key ${cacheKey}, not saving cache.`);
return;
}
@@ -83008,16 +83004,58 @@ var __importStar = (this && this.__importStar) || function (mod) {
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.cacheDependencyGlob = exports.githubToken = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.version = void 0;
exports.githubToken = exports.toolDir = exports.toolBinDir = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.version = void 0;
const core = __importStar(__nccwpck_require__(2186));
const node_path_1 = __importDefault(__nccwpck_require__(9411));
exports.version = core.getInput("version");
exports.checkSum = core.getInput("checksum");
exports.enableCache = core.getInput("enable-cache") === "true";
exports.cacheSuffix = core.getInput("cache-suffix") || "";
exports.cacheLocalPath = core.getInput("cache-local-path");
exports.githubToken = core.getInput("github-token");
exports.cacheLocalPath = getCacheLocalPath();
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
exports.toolBinDir = getToolBinDir();
exports.toolDir = getToolDir();
exports.githubToken = core.getInput("github-token");
function getToolBinDir() {
const toolBinDirInput = core.getInput("tool-bin-dir");
if (toolBinDirInput !== "") {
return toolBinDirInput;
}
if (process.platform === "win32") {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}uv-tool-bin-dir`;
}
throw Error("Could not determine UV_TOOL_BIN_DIR. Please make sure RUNNER_TEMP is set or provide the tool-bin-dir input");
}
return undefined;
}
function getToolDir() {
const toolDirInput = core.getInput("tool-dir");
if (toolDirInput !== "") {
return toolDirInput;
}
if (process.platform === "win32") {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}uv-tool-dir`;
}
throw Error("Could not determine UV_TOOL_DIR. Please make sure RUNNER_TEMP is set or provide the tool-dir input");
}
return undefined;
}
function getCacheLocalPath() {
const cacheLocalPathInput = core.getInput("cache-local-path");
if (cacheLocalPathInput !== "") {
return cacheLocalPathInput;
}
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
}
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
}
/***/ }),
@@ -83176,6 +83214,14 @@ module.exports = require("node:events");
/***/ }),
/***/ 9411:
/***/ ((module) => {
"use strict";
module.exports = require("node:path");
/***/ }),
/***/ 4492:
/***/ ((module) => {

1
dist/save-cache/index.js.map generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

453
dist/setup/37.index.js generated vendored
View File

@@ -1,453 +0,0 @@
"use strict";
exports.id = 37;
exports.ids = [37];
exports.modules = {
/***/ 4037:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "toFormData": () => (/* binding */ toFormData)
/* harmony export */ });
/* harmony import */ var fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2777);
/* harmony import */ var formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8010);
let s = 0;
const S = {
START_BOUNDARY: s++,
HEADER_FIELD_START: s++,
HEADER_FIELD: s++,
HEADER_VALUE_START: s++,
HEADER_VALUE: s++,
HEADER_VALUE_ALMOST_DONE: s++,
HEADERS_ALMOST_DONE: s++,
PART_DATA_START: s++,
PART_DATA: s++,
END: s++
};
let f = 1;
const F = {
PART_BOUNDARY: f,
LAST_BOUNDARY: f *= 2
};
const LF = 10;
const CR = 13;
const SPACE = 32;
const HYPHEN = 45;
const COLON = 58;
const A = 97;
const Z = 122;
const lower = c => c | 0x20;
const noop = () => {};
class MultipartParser {
/**
* @param {string} boundary
*/
constructor(boundary) {
this.index = 0;
this.flags = 0;
this.onHeaderEnd = noop;
this.onHeaderField = noop;
this.onHeadersEnd = noop;
this.onHeaderValue = noop;
this.onPartBegin = noop;
this.onPartData = noop;
this.onPartEnd = noop;
this.boundaryChars = {};
boundary = '\r\n--' + boundary;
const ui8a = new Uint8Array(boundary.length);
for (let i = 0; i < boundary.length; i++) {
ui8a[i] = boundary.charCodeAt(i);
this.boundaryChars[ui8a[i]] = true;
}
this.boundary = ui8a;
this.lookbehind = new Uint8Array(this.boundary.length + 8);
this.state = S.START_BOUNDARY;
}
/**
* @param {Uint8Array} data
*/
write(data) {
let i = 0;
const length_ = data.length;
let previousIndex = this.index;
let {lookbehind, boundary, boundaryChars, index, state, flags} = this;
const boundaryLength = this.boundary.length;
const boundaryEnd = boundaryLength - 1;
const bufferLength = data.length;
let c;
let cl;
const mark = name => {
this[name + 'Mark'] = i;
};
const clear = name => {
delete this[name + 'Mark'];
};
const callback = (callbackSymbol, start, end, ui8a) => {
if (start === undefined || start !== end) {
this[callbackSymbol](ui8a && ui8a.subarray(start, end));
}
};
const dataCallback = (name, clear) => {
const markSymbol = name + 'Mark';
if (!(markSymbol in this)) {
return;
}
if (clear) {
callback(name, this[markSymbol], i, data);
delete this[markSymbol];
} else {
callback(name, this[markSymbol], data.length, data);
this[markSymbol] = 0;
}
};
for (i = 0; i < length_; i++) {
c = data[i];
switch (state) {
case S.START_BOUNDARY:
if (index === boundary.length - 2) {
if (c === HYPHEN) {
flags |= F.LAST_BOUNDARY;
} else if (c !== CR) {
return;
}
index++;
break;
} else if (index - 1 === boundary.length - 2) {
if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
state = S.END;
flags = 0;
} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
index = 0;
callback('onPartBegin');
state = S.HEADER_FIELD_START;
} else {
return;
}
break;
}
if (c !== boundary[index + 2]) {
index = -2;
}
if (c === boundary[index + 2]) {
index++;
}
break;
case S.HEADER_FIELD_START:
state = S.HEADER_FIELD;
mark('onHeaderField');
index = 0;
// falls through
case S.HEADER_FIELD:
if (c === CR) {
clear('onHeaderField');
state = S.HEADERS_ALMOST_DONE;
break;
}
index++;
if (c === HYPHEN) {
break;
}
if (c === COLON) {
if (index === 1) {
// empty header field
return;
}
dataCallback('onHeaderField', true);
state = S.HEADER_VALUE_START;
break;
}
cl = lower(c);
if (cl < A || cl > Z) {
return;
}
break;
case S.HEADER_VALUE_START:
if (c === SPACE) {
break;
}
mark('onHeaderValue');
state = S.HEADER_VALUE;
// falls through
case S.HEADER_VALUE:
if (c === CR) {
dataCallback('onHeaderValue', true);
callback('onHeaderEnd');
state = S.HEADER_VALUE_ALMOST_DONE;
}
break;
case S.HEADER_VALUE_ALMOST_DONE:
if (c !== LF) {
return;
}
state = S.HEADER_FIELD_START;
break;
case S.HEADERS_ALMOST_DONE:
if (c !== LF) {
return;
}
callback('onHeadersEnd');
state = S.PART_DATA_START;
break;
case S.PART_DATA_START:
state = S.PART_DATA;
mark('onPartData');
// falls through
case S.PART_DATA:
previousIndex = index;
if (index === 0) {
// boyer-moore derrived algorithm to safely skip non-boundary data
i += boundaryEnd;
while (i < bufferLength && !(data[i] in boundaryChars)) {
i += boundaryLength;
}
i -= boundaryEnd;
c = data[i];
}
if (index < boundary.length) {
if (boundary[index] === c) {
if (index === 0) {
dataCallback('onPartData', true);
}
index++;
} else {
index = 0;
}
} else if (index === boundary.length) {
index++;
if (c === CR) {
// CR = part boundary
flags |= F.PART_BOUNDARY;
} else if (c === HYPHEN) {
// HYPHEN = end boundary
flags |= F.LAST_BOUNDARY;
} else {
index = 0;
}
} else if (index - 1 === boundary.length) {
if (flags & F.PART_BOUNDARY) {
index = 0;
if (c === LF) {
// unset the PART_BOUNDARY flag
flags &= ~F.PART_BOUNDARY;
callback('onPartEnd');
callback('onPartBegin');
state = S.HEADER_FIELD_START;
break;
}
} else if (flags & F.LAST_BOUNDARY) {
if (c === HYPHEN) {
callback('onPartEnd');
state = S.END;
flags = 0;
} else {
index = 0;
}
} else {
index = 0;
}
}
if (index > 0) {
// when matching a possible boundary, keep a lookbehind reference
// in case it turns out to be a false lead
lookbehind[index - 1] = c;
} else if (previousIndex > 0) {
// if our boundary turned out to be rubbish, the captured lookbehind
// belongs to partData
const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
callback('onPartData', 0, previousIndex, _lookbehind);
previousIndex = 0;
mark('onPartData');
// reconsider the current character even so it interrupted the sequence
// it could be the beginning of a new sequence
i--;
}
break;
case S.END:
break;
default:
throw new Error(`Unexpected state entered: ${state}`);
}
}
dataCallback('onHeaderField');
dataCallback('onHeaderValue');
dataCallback('onPartData');
// Update properties for the next call
this.index = index;
this.state = state;
this.flags = flags;
}
end() {
if ((this.state === S.HEADER_FIELD_START && this.index === 0) ||
(this.state === S.PART_DATA && this.index === this.boundary.length)) {
this.onPartEnd();
} else if (this.state !== S.END) {
throw new Error('MultipartParser.end(): stream ended unexpectedly');
}
}
}
function _fileName(headerValue) {
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
if (!m) {
return;
}
const match = m[2] || m[3] || '';
let filename = match.slice(match.lastIndexOf('\\') + 1);
filename = filename.replace(/%22/g, '"');
filename = filename.replace(/&#(\d{4});/g, (m, code) => {
return String.fromCharCode(code);
});
return filename;
}
async function toFormData(Body, ct) {
if (!/multipart/i.test(ct)) {
throw new TypeError('Failed to fetch');
}
const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
if (!m) {
throw new TypeError('no or bad content-type header, no multipart boundary');
}
const parser = new MultipartParser(m[1] || m[2]);
let headerField;
let headerValue;
let entryValue;
let entryName;
let contentType;
let filename;
const entryChunks = [];
const formData = new formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__/* .FormData */ .Ct();
const onPartData = ui8a => {
entryValue += decoder.decode(ui8a, {stream: true});
};
const appendToFile = ui8a => {
entryChunks.push(ui8a);
};
const appendFileToFormData = () => {
const file = new fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__/* .File */ .$B(entryChunks, filename, {type: contentType});
formData.append(entryName, file);
};
const appendEntryToFormData = () => {
formData.append(entryName, entryValue);
};
const decoder = new TextDecoder('utf-8');
decoder.decode();
parser.onPartBegin = function () {
parser.onPartData = onPartData;
parser.onPartEnd = appendEntryToFormData;
headerField = '';
headerValue = '';
entryValue = '';
entryName = '';
contentType = '';
filename = null;
entryChunks.length = 0;
};
parser.onHeaderField = function (ui8a) {
headerField += decoder.decode(ui8a, {stream: true});
};
parser.onHeaderValue = function (ui8a) {
headerValue += decoder.decode(ui8a, {stream: true});
};
parser.onHeaderEnd = function () {
headerValue += decoder.decode();
headerField = headerField.toLowerCase();
if (headerField === 'content-disposition') {
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
if (m) {
entryName = m[2] || m[3] || '';
}
filename = _fileName(headerValue);
if (filename) {
parser.onPartData = appendToFile;
parser.onPartEnd = appendFileToFormData;
}
} else if (headerField === 'content-type') {
contentType = headerValue;
}
headerValue = '';
headerField = '';
};
for await (const chunk of Body) {
parser.write(chunk);
}
parser.end();
return formData;
}
/***/ })
};
;
//# sourceMappingURL=37.index.js.map

1
dist/setup/37.index.js.map generated vendored

File diff suppressed because one or more lines are too long

4591
dist/setup/index.js generated vendored

File diff suppressed because it is too large Load Diff

1
dist/setup/index.js.map generated vendored

File diff suppressed because one or more lines are too long

1056
dist/setup/licenses.txt generated vendored

File diff suppressed because it is too large Load Diff

1
dist/setup/sourcemap-register.js generated vendored

File diff suppressed because one or more lines are too long

35031
dist/update-checksums/index.js generated vendored

File diff suppressed because one or more lines are too long

1
dist/update-checksums/index.js.map generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

34791
dist/update-default-version/index.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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

@@ -32708,24 +32708,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.updateChecksums = updateChecksums;
const fs_1 = __nccwpck_require__(7147);
const node_fs_1 = __nccwpck_require__(7561);
const tc = __importStar(__nccwpck_require__(7784));
function updateChecksums(filePath, downloadUrls) {
return __awaiter(this, void 0, void 0, function* () {
yield fs_1.promises.rm(filePath);
yield fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: {[key: string]: string} = {\n");
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 content = yield downloadAssetContent(downloadUrl);
const checksum = content.split(" ")[0].trim();
const key = getKey(downloadUrl);
if (!firstLine) {
yield fs_1.promises.appendFile(filePath, ",\n");
yield node_fs_1.promises.appendFile(filePath, ",\n");
}
yield fs_1.promises.appendFile(filePath, ` '${key}':\n '${checksum}'`);
yield node_fs_1.promises.appendFile(filePath, ` '${key}':\n '${checksum}'`);
firstLine = false;
}
yield fs_1.promises.appendFile(filePath, "}\n");
yield node_fs_1.promises.appendFile(filePath, "}\n");
});
}
function getKey(downloadUrl) {
@@ -32739,7 +32739,7 @@ function getKey(downloadUrl) {
function downloadAssetContent(downloadUrl) {
return __awaiter(this, void 0, void 0, function* () {
const downloadPath = yield tc.downloadTool(downloadUrl);
const content = yield fs_1.promises.readFile(downloadPath, "utf8");
const content = yield node_fs_1.promises.readFile(downloadPath, "utf8");
return content;
});
}
@@ -32787,7 +32787,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
Object.defineProperty(exports, "__esModule", ({ value: true }));
const github = __importStar(__nccwpck_require__(5438));
const core = __importStar(__nccwpck_require__(2186));
const utils_1 = __nccwpck_require__(239);
const constants_1 = __nccwpck_require__(8593);
const semver = __importStar(__nccwpck_require__(5911));
const update_known_checksums_1 = __nccwpck_require__(7554);
function run() {
@@ -32796,8 +32796,8 @@ function run() {
const github_token = process.argv.slice(2)[1];
const octokit = github.getOctokit(github_token);
const response = yield octokit.paginate(octokit.rest.repos.listReleases, {
owner: utils_1.OWNER,
repo: utils_1.REPO,
owner: constants_1.OWNER,
repo: constants_1.REPO,
});
const downloadUrls = response.flatMap((release) => release.assets
.filter((asset) => asset.name.endsWith(".sha256"))
@@ -32814,7 +32814,7 @@ run();
/***/ }),
/***/ 239:
/***/ 8593:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -32940,6 +32940,14 @@ module.exports = require("node:events");
/***/ }),
/***/ 7561:
/***/ ((module) => {
"use strict";
module.exports = require("node:fs");
/***/ }),
/***/ 4492:
/***/ ((module) => {

5547
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,9 +6,9 @@
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"format": "prettier --write .",
"format-check": "prettier --check .",
"lint": "eslint src/**/*.ts --fix",
"format": "biome format --fix",
"format-check": "biome format",
"lint": "biome lint --fix",
"package": "ncc build -o dist/setup src/setup-uv.ts && ncc build -o dist/save-cache src/save-cache.ts && ncc build -o dist/update-known-checksums src/update-known-checksums.ts",
"test": "jest",
"act": "act pull_request -W .github/workflows/test.yml --container-architecture linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"",
@@ -19,12 +19,7 @@
"type": "git",
"url": "git+https://github.com/astral-sh/setup-uv.git"
},
"keywords": [
"actions",
"python",
"setup",
"uv"
],
"keywords": ["actions", "python", "setup", "uv"],
"author": "@eifinger",
"license": "MIT",
"dependencies": {
@@ -38,20 +33,13 @@
"@octokit/rest": "^21.0.2"
},
"devDependencies": {
"@types/node": "^22.5.4",
"@biomejs/biome": "1.9.2",
"@types/node": "^22.7.4",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.18.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-plugin-github": "^5.0.1",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"js-yaml": "^4.1.0",
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
}
}

View File

@@ -1,7 +1,6 @@
import * as cache from "@actions/cache";
import * as glob from "@actions/glob";
import * as core from "@actions/core";
import path from "path";
import {
cacheDependencyGlob,
cacheLocalPath,
@@ -37,11 +36,18 @@ export async function restoreCache(version: string): Promise<void> {
async function computeKeys(version: string): Promise<string> {
let cacheDependencyPathHash = "-";
if (cacheDependencyGlob !== "") {
const fullCacheDependencyGlob = `${process.env["GITHUB_WORKSPACE"]}${path.sep}${cacheDependencyGlob}`;
cacheDependencyPathHash += await glob.hashFiles(fullCacheDependencyGlob);
core.info(
`Searching files using cache dependency glob: ${cacheDependencyGlob.split("\n").join(",")}`,
);
cacheDependencyPathHash += await glob.hashFiles(
cacheDependencyGlob,
undefined,
undefined,
true,
);
if (cacheDependencyPathHash === "-") {
throw new Error(
`No file in ${process.cwd()} matched to [${cacheDependencyGlob}], make sure you have checked out the target repository`,
`No file in ${process.cwd()} matched to [${cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`,
);
}
} else {

View File

@@ -1,9 +1,9 @@
import * as fs from "fs";
import * as crypto from "crypto";
import * as fs from "node:fs";
import * as crypto from "node:crypto";
import * as core from "@actions/core";
import { KNOWN_CHECKSUMS } from "./known-checksums";
import { Architecture, Platform } from "../../utils/platforms";
import type { Architecture, Platform } from "../../utils/platforms";
export async function validateChecksum(
checkSum: string | undefined,
@@ -12,11 +12,11 @@ export async function validateChecksum(
platform: Platform,
version: string,
): Promise<void> {
let isValid = true;
let isValid: boolean | undefined = undefined;
if (checkSum !== undefined && checkSum !== "") {
isValid = await validateFileCheckSum(downloadPath, checkSum);
} else {
core.debug(`Checksum not provided. Checking known checksums.`);
core.debug("Checksum not provided. Checking known checksums.");
const key = `${arch}-${platform}-${version}`;
if (key in KNOWN_CHECKSUMS) {
const knownChecksum = KNOWN_CHECKSUMS[`${arch}-${platform}-${version}`];
@@ -27,10 +27,12 @@ export async function validateChecksum(
}
}
if (!isValid) {
if (isValid === false) {
throw new Error(`Checksum for ${downloadPath} did not match ${checkSum}.`);
}
core.debug(`Checksum for ${downloadPath} is valid.`);
if (isValid === true) {
core.debug(`Checksum for ${downloadPath} is valid.`);
}
}
async function validateFileCheckSum(

View File

@@ -1,5 +1,509 @@
// AUTOGENERATED_DO_NOT_EDIT
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
"undefined-0.4.18":
"9b2ae8c5a8db7b0106f636510b76cf21273ead5cb1162c19c7b2a5d1b1b6782e",
"aarch64-apple-darwin-0.4.18":
"49929e29bad25dfdb2f4ec49973c2265fbb538ddef3b1fa46fdb20245fa7a605",
"aarch64-unknown-linux-gnu-0.4.18":
"6a949b7230ea5c557faf1a2974940036b1b732d2fd073ef35b665fccc11fa34b",
"aarch64-unknown-linux-musl-0.4.18":
"59d50976e32d18ea94210dcd8da4eea3306690e3edc1cb5a40342ca1f7db2c47",
"arm-unknown-linux-musleabihf-0.4.18":
"13a232efd19792802831e13137efae692cb467eb17e53118e4f4dbf65fa37def",
"armv7-unknown-linux-gnueabihf-0.4.18":
"15665159b7f5d27b45eb833f3448714b9069472ccd165af5b9c26ae24306a013",
"armv7-unknown-linux-musleabihf-0.4.18":
"714a63650fddc889053ad27f41ee513f2a736fbecf3fd5ba5051b7a13564d0aa",
"i686-pc-windows-msvc-0.4.18":
"acc6e07df1b96e42d8e3becea4aa70110c921e6f77f69b521f7477222651bc75",
"i686-unknown-linux-gnu-0.4.18":
"908df3634d34f90e49b2e5e67fb627b0a4d8c0571719c60edf28e1a1ee277154",
"i686-unknown-linux-musl-0.4.18":
"48aad5171df7e21d22438bf3af3fbe6cdae409e09cee3842d5782dfd11428003",
"powerpc64-unknown-linux-gnu-0.4.18":
"0f500d33f5c52addf735329ce6818c8b9226ed379dc63593b0a6a51ef5274c04",
"powerpc64le-unknown-linux-gnu-0.4.18":
"8991bddaaad0c06305dd5c4a91e3ece36016de816eeb75f6ee1e3ff9148f65b3",
"powerpc64le-unknown-linux-musl-0.4.18":
"0f12157dab6cd370a5f71d9c6d83d5875a3e11ea91977e4f189115ed9f56805d",
"s390x-unknown-linux-gnu-0.4.18":
"5c4c101fdf5d29677a4b7ed2bb54d0a7b5c3cfa7abadb8d9ef58f02f68703e38",
"x86_64-apple-darwin-0.4.18":
"a99d009f16b6681825ab8a672f83bcf838e851a8914c497ccf65f310b5be17b9",
"x86_64-pc-windows-msvc-0.4.18":
"f6cffb80499da1e3ca0a3bb4710cb3601f6933315f5568ce4b785c664d65c644",
"x86_64-unknown-linux-gnu-0.4.18":
"946243fa93da15d33e2d2bb59cf9bc622806b5bf5776da8b0e27562e608ad8a1",
"x86_64-unknown-linux-musl-0.4.18":
"f0cc269adcad633f06ad50755af38d8f5bf745fbe7e4edafa35cfbb286706397",
"undefined-0.4.17":
"68ad7bf18029bcc9f0c8556e5fb96814fa30d8f67b3ccbc5db19e38b487c9326",
"aarch64-apple-darwin-0.4.17":
"af8e68a0e831e8b482d9e2f5443af63d24d003b0c53e0d5f921c2bcb5eed1644",
"aarch64-unknown-linux-gnu-0.4.17":
"5b7c0269aa15aca1f6171e06db39e24a5ec81f1b484ab382a8db218424afc5b4",
"aarch64-unknown-linux-musl-0.4.17":
"7dc33d60655e7a78bf13ad68bff89da6233b24484cd01a668d72a4ca88c7e70d",
"arm-unknown-linux-musleabihf-0.4.17":
"1e409703fa3639ac01d5c2b277763987b3b6e856097bb7c59dec168861ad9d9b",
"armv7-unknown-linux-gnueabihf-0.4.17":
"b14484ed08fe0073db869ed73c12f2ca1d45f22daabba241e2aa12086793ba51",
"armv7-unknown-linux-musleabihf-0.4.17":
"6920000627deb6f101dd6a144f1930f4649550d9bf2eb9189fa7d38270d85900",
"i686-pc-windows-msvc-0.4.17":
"c8a2c21e23694e4d8079693d8d980642ceabad7589a8da5d5c112844cd9a1530",
"i686-unknown-linux-gnu-0.4.17":
"67d1ed2af42d7f355eb08325645013e24fc3797f33cfa9d5aca18f74a98c4885",
"i686-unknown-linux-musl-0.4.17":
"771dbc2b9bda1653029018eb6b7e98d83935df26595a2194bc7f57251bdd9caf",
"powerpc64-unknown-linux-gnu-0.4.17":
"f2c4ea4bed0f4f42686742bc1078761a232b1ce51532169f17bd99ebb2595ec3",
"powerpc64le-unknown-linux-gnu-0.4.17":
"915a06db243c43cc88f96bf271dd25a3f564ebdda097b79b6d0ee3a6835fc6e2",
"powerpc64le-unknown-linux-musl-0.4.17":
"faaefdc9ed84ab263d0be277b4cccd0a7cd0870fb3bc77a50e293a5d2d74d207",
"s390x-unknown-linux-gnu-0.4.17":
"a49de0293c8177367bd90c527dc88c105e100d04a866ed15898a2f9778e1c648",
"x86_64-apple-darwin-0.4.17":
"7ed2445e83cb919525535774004e294061a8c79253367490647c6aab0e9d06b8",
"x86_64-pc-windows-msvc-0.4.17":
"929407c72ec63c54502c3aef61a2195c2b6a145d6d4b15fd9a0528475cc5cd50",
"x86_64-unknown-linux-gnu-0.4.17":
"9282496b24585c54f4cb71c1cb1dbdecd650f2311237f71ddf217f8756136f79",
"x86_64-unknown-linux-musl-0.4.17":
"6f703368f2d5d4c974e3ece239f64815fb0c6e040eba078ffc87c421a9375deb",
"undefined-0.4.16":
"942296098d4738db464ea170c654d61281f35cd98fc1ecc6c6df784ba9373bb3",
"aarch64-apple-darwin-0.4.16":
"cbfb46932ced7319e0b90cff87bfff759bc319e719cca369ace476906b178f25",
"aarch64-unknown-linux-gnu-0.4.16":
"c5f4f0a7acdbcb6273d117ac9a72767406e2a8da3cc2c72b5818ca08165e90c9",
"aarch64-unknown-linux-musl-0.4.16":
"7f093031e442181b7504fd55e9d0211358646b4fead1317d45aba44efcab719e",
"arm-unknown-linux-musleabihf-0.4.16":
"ec9ca782be4eabb583423539fd335cc1ff9edcbcca8f73cd4cc4a6cdc433023a",
"armv7-unknown-linux-gnueabihf-0.4.16":
"ee55becb4a3e861fdc25eb42fb9fd224625bc6cb06391894aa2b064aa00682d0",
"armv7-unknown-linux-musleabihf-0.4.16":
"5c8dc9de0130004b63ac0b104b460f93bbccc47bc2274294c27ad922142f8d8a",
"i686-pc-windows-msvc-0.4.16":
"44e1d1cb1bb87b18ef6a106585e6860cbe4cda7cd9475cd20eb68b741d4d9293",
"i686-unknown-linux-gnu-0.4.16":
"72799882d18ea4b8ad7cf8b12768c35311d25f6c4eb241a12d44d52b2b02efc3",
"i686-unknown-linux-musl-0.4.16":
"0bb65ab130e6cad00c4d28c8c4f359157bf752ec92145ca44769e66a1143804b",
"powerpc64-unknown-linux-gnu-0.4.16":
"5699b114794b83b42753f4ddeefd00c902e10564733879efeb45b60dd25b04f5",
"powerpc64le-unknown-linux-gnu-0.4.16":
"65f61fc69579d7f6a7238bd180588481ea4b20ff5d45ee62ce590229d53dbb3d",
"powerpc64le-unknown-linux-musl-0.4.16":
"48c83cf9ce5b3e4ecce2fe305aa3f4f8fc0a633f8a0398c7f59f501e8db61fb6",
"s390x-unknown-linux-gnu-0.4.16":
"112e6dea4ddbc6c0dbf416bc7d5dff79fcacd3e0f7fa52772f7647b8cd26ca25",
"x86_64-apple-darwin-0.4.16":
"ecf035262115b216f6cc709917418df9dbafe47d49b8048c465faa406face032",
"x86_64-pc-windows-msvc-0.4.16":
"93a6df8f8225fb73dda275d06455fe5026f00c42e8dccc787812841c0c104291",
"x86_64-unknown-linux-gnu-0.4.16":
"f4f4de434206fb610ecb2dbc3fc44c62adb6b61e8d1237d858a10b407a2737c4",
"x86_64-unknown-linux-musl-0.4.16":
"aab3a3ef8e4ffa641210b1ed374eebd08b5e612b1a928c291a543d3b624d46d1",
"undefined-0.4.15":
"22b605c86cfcb8db9922387151fd8e79d3d2a1caf6f2a03a238ca7ebe058853f",
"aarch64-apple-darwin-0.4.15":
"32f6ad64b9dcf164fa75efef73e0e9a9b769073e6bfe844560329a3176b39b9b",
"aarch64-unknown-linux-gnu-0.4.15":
"cf3f9f98642bd2a7e9d6fa27d880bdbdccc16b6a525b240013789d3048c02348",
"aarch64-unknown-linux-musl-0.4.15":
"fbc0433275134fc50d25ce3c291b3e7a53ffb70b447741398c31d6c4deeba4b8",
"arm-unknown-linux-musleabihf-0.4.15":
"4cc15f1cd1bf5b3508886baa005c6dd51ae7cf995e8699c100ee5a32da70f13b",
"armv7-unknown-linux-gnueabihf-0.4.15":
"380366651e5c924239f1e085fade96ec04d1a312c8a9db7a9f383fcf87e073d1",
"armv7-unknown-linux-musleabihf-0.4.15":
"50eb304472f7b6b02c4fed987e0931f02a0b5e7c1620559f0246416e725297f5",
"i686-pc-windows-msvc-0.4.15":
"3ad9d42a4308adc69dd7061b0ba9451b26d118032d3937dd92e3acef4aa62a40",
"i686-unknown-linux-gnu-0.4.15":
"2e90ee238cba49c5f096c8b0648c7fc531a75dcf0c26eb0cde4d9ce5447d8d82",
"i686-unknown-linux-musl-0.4.15":
"0120dfe81ebc98d20dec01f8ce7a8c571673155dbd67ab08a6cf4000de85df65",
"powerpc64-unknown-linux-gnu-0.4.15":
"ef10cefd6db62ea6c4ae082457b720332927e86ad3e1dc404da75961d9bd987c",
"powerpc64le-unknown-linux-gnu-0.4.15":
"e58fa6d325e81bd845265c980f3dc7ffcd6ae6b912c525bc165938964bc2b0c0",
"powerpc64le-unknown-linux-musl-0.4.15":
"c64194823946c45640990c1616f2043bda63e05a2fcfdcc33fd64bbadcc6408b",
"s390x-unknown-linux-gnu-0.4.15":
"662f0bee11f330a80b002eb3b6d74f574832b1ceee6943a6bdc0486dabde3514",
"x86_64-apple-darwin-0.4.15":
"ab91ee8c6461e9ac385a2f96d23d77e027b4e4274e983d0aedf1d64abfb6353b",
"x86_64-pc-windows-msvc-0.4.15":
"17e7ecb448c8b507bb08347df6aa974f58a7536b6fbe21f0ce57372509e409a0",
"x86_64-unknown-linux-gnu-0.4.15":
"f590376432bcb26c2aff86b6ec495d55ba2384d068c62dca477f498902721674",
"x86_64-unknown-linux-musl-0.4.15":
"70e331be83d97f42fd355f18cb1f8b3f4cadc4973b29fec659109fad4a053a8f",
"undefined-0.4.14":
"d73771243ecb8f38a925f16894126644aec95da7557eef22d7c161d9b8af69e9",
"aarch64-apple-darwin-0.4.14":
"e7368a2ffe19cc39e4b733c0b5ddced9952da85fad5d5eb55c75c4a67c7e4747",
"aarch64-unknown-linux-gnu-0.4.14":
"3647ba1da46b7b2dde959c03e3dfd54ad63e7fefe3de7789e1d88931712da1c1",
"aarch64-unknown-linux-musl-0.4.14":
"11a871df0ca91843e09871e7ee8f5d000a3df73f8dd6d7d1ebf0f237feaa18c8",
"arm-unknown-linux-musleabihf-0.4.14":
"8aaf34ca8078db54597173961788f7a9f292ce473629e0b684f7c7b346fb5a68",
"armv7-unknown-linux-gnueabihf-0.4.14":
"6a59fc0794760c20f01dac7594a7559f871d8428b5440303a9e450ae72a53c96",
"armv7-unknown-linux-musleabihf-0.4.14":
"099db2dc91ea868864c55e0820bfa1c279af07259aee4ccfe151e2f3a208aaf4",
"i686-pc-windows-msvc-0.4.14":
"a6d255d229d2447a259d8affe9e537aadb12079852c1bc9097664371e2406a82",
"i686-unknown-linux-gnu-0.4.14":
"6389b5000e256b150f8c185ff3fb28c6bfc4116ad35f07b7b49088675d7c9ceb",
"i686-unknown-linux-musl-0.4.14":
"2307c79f88b9302b4ec2db9d500a240b0710f9e011548e776dfbd15fa1c084e7",
"powerpc64-unknown-linux-gnu-0.4.14":
"01d94b9de93a424781d5a4b4890b6f4e5f5ea59d98363415d4f90fa75ee80426",
"powerpc64le-unknown-linux-gnu-0.4.14":
"0ab4524a49d201368da79ff3d69a01b780cefcec7115acc1448d4a3b71fa3c24",
"powerpc64le-unknown-linux-musl-0.4.14":
"51cc5cbb145f09e60a4a739a8e664657fd0b3d81053b2973ac133513aa43aae2",
"s390x-unknown-linux-gnu-0.4.14":
"f30bb00682299ca9e10e98f387178f839e136414b66ab99f2e28b6f160258315",
"x86_64-apple-darwin-0.4.14":
"442b93a10d3d5d5422c615f73bb13bd491ee88bc2ea913185728940a31c51b35",
"x86_64-pc-windows-msvc-0.4.14":
"dbde8853a1d7c005e34dee03ec1bfc337374c111c86b26701c403bba6076254c",
"x86_64-unknown-linux-gnu-0.4.14":
"873b4b95c5d3d49ae1306122256cb0b116b5c725e068db8100a76efb13d7669d",
"x86_64-unknown-linux-musl-0.4.14":
"1985046d3e36acd02395c704dcd9d1aff03114afe13fdc166754675bae8ad294",
"undefined-0.4.13":
"1164572b6a4700821bd3cb72594f7421aafa414c8d1a94e9570e530ca7a5c635",
"aarch64-apple-darwin-0.4.13":
"32d73e0257dab4371254d26bd9328de4e43b7817ee154d7c77e879df130b15c4",
"aarch64-unknown-linux-gnu-0.4.13":
"0f653d8ece44da59056dd2fda6bddc7e274ed4d6431787bd7aa26ae7e02a66d3",
"aarch64-unknown-linux-musl-0.4.13":
"c24306c2cfc3bcaeab57f866c2501f07e21098fa03db7c1e5961280d44404443",
"arm-unknown-linux-musleabihf-0.4.13":
"f8b9375a7ff918e6b4ec2fbaa4fbac0707b85d9a391ab82a888ec07f4d7ae813",
"armv7-unknown-linux-gnueabihf-0.4.13":
"ab59e9586b89d11ee043aff7410712fa2bc178b6aa83eb70173b81d6f2ef93b5",
"armv7-unknown-linux-musleabihf-0.4.13":
"bdb133e0ecfe889661910bb52f77c54268b82161fdb8af2b1f6c867537626a39",
"i686-pc-windows-msvc-0.4.13":
"b4a92170b85d63ee9d7ac3a9b07fa444e4257e3dfb91a22774c1f76f94a06ddb",
"i686-unknown-linux-gnu-0.4.13":
"a4f2dc1eb9526ae9f1a617fddfc8e565817540ee06b022cc85a31f8915b8130e",
"i686-unknown-linux-musl-0.4.13":
"0f72e2a16e55b57feb8741f86f3e968f3e080868da6c848f6a115149b7d63652",
"powerpc64-unknown-linux-gnu-0.4.13":
"44471a861399b11870b41f8c0e4b8080490803b2c6be5ebf906a09ac0e67b5c9",
"powerpc64le-unknown-linux-gnu-0.4.13":
"4a95260671f6578f773c70aab21da55f1995dde7dbd38794e510a6b5b0fd0c1e",
"powerpc64le-unknown-linux-musl-0.4.13":
"bf3fef07eeb29f1bd79b677afcc52deb1f594fd13bfe25c0d4f05c171957d717",
"s390x-unknown-linux-gnu-0.4.13":
"548e6cfb8ac09cf422d6fef9886ed8ba73bda8333f69ae420aab2cd5f676d7cc",
"x86_64-apple-darwin-0.4.13":
"fb58d588c237218c275f63b6b77eda9477d2c1e1007605e10207c2504ae2a6d5",
"x86_64-pc-windows-msvc-0.4.13":
"888e73d16bc7c67ee2e369e4660249ec107efaf998583cce68dbcd942b76d047",
"x86_64-unknown-linux-gnu-0.4.13":
"0f955f51eaa3ccf56215ace06dab2e9b78437e22002eabc2cedcfcf541d997b2",
"x86_64-unknown-linux-musl-0.4.13":
"c8f73e30407a6e15eea7334f7067ac84ae1526a1ae7f4420dc873492bdfe626e",
"undefined-0.4.12":
"335861d17540501e2c5f82f5b8955b07034c450edb292fd2d628a837f52e0054",
"aarch64-apple-darwin-0.4.12":
"507aeb4efbb4a2b97654df8333aaa9d78109c55e3c3d5959f50cf0d93baa0263",
"aarch64-unknown-linux-gnu-0.4.12":
"73c6f84462895eb924b6fddc2cfef6b9fde0e0c15ff45a0eb882ec5275f5a2f7",
"aarch64-unknown-linux-musl-0.4.12":
"7329992bee100397b3520f1e93512804aa47ea01404c05609aedd181311cdf3b",
"arm-unknown-linux-musleabihf-0.4.12":
"21e4bcaf22259b4a473912403e9a89debd7f8f052e2f5d7d52f350539adade9e",
"armv7-unknown-linux-gnueabihf-0.4.12":
"7a0433a46595b40d9e50eb9a8aeb193b18eb5d545a677a646f86760b716f4b6e",
"armv7-unknown-linux-musleabihf-0.4.12":
"3803d4ef65fea709940bd897c9d27123cd60ca1f72b173eadad69a9949bf1e69",
"i686-pc-windows-msvc-0.4.12":
"e0550b4db9d9074560cdff66e81298288ddeb75347585514601c598ea46df54f",
"i686-unknown-linux-gnu-0.4.12":
"4c0a025f4b1f40a4248435410cbc1c6df0656ccee02f145aecedefac0efac392",
"i686-unknown-linux-musl-0.4.12":
"a0572decd32eb5917bb80bc8d1de0351be362b6a06423ae36bd03c745292c1f7",
"powerpc64-unknown-linux-gnu-0.4.12":
"51e624d5317e4ac6bcd67d1cae49e092c0186cab3dab4f7fa15c2e32066e16f8",
"powerpc64le-unknown-linux-gnu-0.4.12":
"5eafc18d05671ad38488f1b1d48712e829f4eb7f0d25eac423be79e7d8834cdf",
"powerpc64le-unknown-linux-musl-0.4.12":
"926d3caff745f4b4c376ff4328cf5129b8f61af6671d84614270ed8fa05816ca",
"s390x-unknown-linux-gnu-0.4.12":
"810cd900581925ee16e7d606e30fa39912123f9d96a740dbc1f4f9aa3d7e9760",
"x86_64-apple-darwin-0.4.12":
"d2934f4afba1f33d4078cbde301e780db132df6d33f2f5b27df466775e01b236",
"x86_64-pc-windows-msvc-0.4.12":
"4dc5e08f2f69245859b8ff57c7e6f844ebd1a65df12ae13f66a068268af17389",
"x86_64-unknown-linux-gnu-0.4.12":
"db44453ec57d6e3a35b7af2bb7938b47bdc9e7ca397269e978c53dd3065b1195",
"x86_64-unknown-linux-musl-0.4.12":
"ef9551ecf6f0efd51264f8a6a683b8b0210789aeaeab664863a90535a553b985",
"undefined-0.4.11":
"e6e38118aaa7436d31d3aed0f4b0beb188c273c137bd3185e8b4ebdb301682aa",
"aarch64-apple-darwin-0.4.11":
"b988bce29ca19fa229f088f982b66ef9dbf8571cc45eb98b00370a817cfe383a",
"aarch64-unknown-linux-gnu-0.4.11":
"865feeea66be67497506b76925949f97eb1f6da7dda2583a6558bed972f5de13",
"aarch64-unknown-linux-musl-0.4.11":
"db1b16b5e8d943a296667d176e474739c652660cbf56ee5e9157aa7e267442fb",
"arm-unknown-linux-musleabihf-0.4.11":
"9a141516deb4c966d4ae5a4d14dfef0f3c7880817823645760c09fb4cc580ce3",
"armv7-unknown-linux-gnueabihf-0.4.11":
"4748f81c391e0040eb489056677f6caee5886e5c15ef85448db51f11ea9b90df",
"armv7-unknown-linux-musleabihf-0.4.11":
"b564fb4631b6b668d891ec2ce91af10fda1f4374bd846eab24a85abb6fd77b25",
"i686-pc-windows-msvc-0.4.11":
"f1c0c12a40097949aa793f870f811ac8ffcc349228f0d3cae246bd93108e62da",
"i686-unknown-linux-gnu-0.4.11":
"c894193d37fa6cedb3b6c76d85bcca6031a5ef051adb046d583b7f078edc3872",
"i686-unknown-linux-musl-0.4.11":
"c80a63db7be49971b91417fdd5b9327803c38e23998d88d2a3489a2d9fa32de2",
"powerpc64-unknown-linux-gnu-0.4.11":
"f5ecc0461d1b9a8f56804abf5b2200aa22c08b89f404845a9f684817d0824521",
"powerpc64le-unknown-linux-gnu-0.4.11":
"862c8cdc587d435e09aaa0645440d1a8d72e23c68050cd978d4e5d11aede6a6b",
"powerpc64le-unknown-linux-musl-0.4.11":
"82bfb567ab6f2412706f157a998925fd49a491a4eaffb2bf8c09ca512be51a2f",
"s390x-unknown-linux-gnu-0.4.11":
"4b3cacd593aaecbaf193633f3105851ba7fe6627ed567bc3133e48a398e7c947",
"x86_64-apple-darwin-0.4.11":
"1db522b0eebb16cc08094b558f76048834a4d25878d74e07c5b4b7320239a5ab",
"x86_64-pc-windows-msvc-0.4.11":
"b9d43ddca9affbf03c048e34112c470a37af8d8e04c3ff2b79933a073f48e34d",
"x86_64-unknown-linux-gnu-0.4.11":
"3fc34d56857f24c7065309593a5df05ce953f1736f0cf32965b91f69adb66c46",
"x86_64-unknown-linux-musl-0.4.11":
"c3c6eb97198a29c6ca51bed673941ffbe7d97d481e74eec034fd8ad8d59b187c",
"undefined-0.4.10":
"53751ecdbad6aa09b13986e73e1ba1990b348b1793f313fdecaf3bd464311d28",
"aarch64-apple-darwin-0.4.10":
"e8cf273f464d36b72237347eb42a0bfe75d473a029bc4f89d5a2c098f971186c",
"aarch64-unknown-linux-gnu-0.4.10":
"eb2bd6709ac9634444e4cd7d1b1db05549d602579845ddbd52152dfd1916c723",
"aarch64-unknown-linux-musl-0.4.10":
"e2fa68d49d83fac5961ae57232d2896bde52f1aad40c9a88cfb3ffcde6130043",
"arm-unknown-linux-musleabihf-0.4.10":
"2b9c91b9bfdd07f1b81671b70a1d3ae2c843991c30d11a31ec96efe34d9326dd",
"armv7-unknown-linux-gnueabihf-0.4.10":
"ac56ab4b0f99b2c2288f95dd0ad7a2395d118e023f00c3da307e054d1adfc970",
"armv7-unknown-linux-musleabihf-0.4.10":
"a9e4bf044ad4aeb6c8ae4c2068a3767264da4cb033befe6b64567490d24b586d",
"i686-pc-windows-msvc-0.4.10":
"ead4fcbb66fe148650ea1bfe0a826aa2b6d895d94fb590f04dbd910a390ac8f9",
"i686-unknown-linux-gnu-0.4.10":
"e1e20f3b5ec85e5e8b193aa20e0e112e0590332208fa4537d3cc5043ccaf49aa",
"i686-unknown-linux-musl-0.4.10":
"10c8deba52e78411ab78b2096b5ca32ec3910915db11845269a76c0333ef6a7f",
"powerpc64-unknown-linux-gnu-0.4.10":
"86b2c97c8f512ddef6639eac9a19f803865ea445488379ed5ab9dd61ff1f89e2",
"powerpc64le-unknown-linux-gnu-0.4.10":
"de6c605fc1bc02b29e109b6a1c2be82dca60bbe65ae8691ac9b47e86abbe4c5b",
"powerpc64le-unknown-linux-musl-0.4.10":
"c590a2050bbcabcafe569014774b59b03e9ee8f356d270bcc35595bcb6e9906b",
"s390x-unknown-linux-gnu-0.4.10":
"2ade7963186ca5d70bb36b3ac89f5c36bddb82c6a34b0a8d1ddf553ce1afb76a",
"x86_64-apple-darwin-0.4.10":
"828b02de490735955b2c5e83d2758eba668a981b8a61d8afe4f9ddf70c523c17",
"x86_64-pc-windows-msvc-0.4.10":
"b2a2257c1d3fecaf1258483465e82958a223e6ac2a057f090cd83d4df41e948f",
"x86_64-unknown-linux-gnu-0.4.10":
"fd5540ef6cdc80091094a2fbc29b2cecab6c41b0a204220d9c882120210bbd11",
"x86_64-unknown-linux-musl-0.4.10":
"c911e323f3eaf0486755fb5a109e3b1fc4fdbe07e3fed49054e78973f5b70226",
"undefined-0.4.9":
"a5ca243a43868c5eb259bc80d83d5fa32ba33dea6534a1e96683535bfb0011f8",
"aarch64-apple-darwin-0.4.9":
"049466d3f7f86262f5915b57cc037b2c814634fa4733ba2bd9062b72c4264482",
"aarch64-unknown-linux-gnu-0.4.9":
"7f8eb20c003bc789136d80ad4dd9f1b2875d30e41ed085197eada9e3ad0fdda6",
"aarch64-unknown-linux-musl-0.4.9":
"82c9ac934f587a36910b47f11b430472280e6a0d28d3f3ba126aaa6fee3b9767",
"arm-unknown-linux-musleabihf-0.4.9":
"06546daa31d52d4ff9ff5589d1549c18988758f583912a5bba65d27e57c5f89b",
"armv7-unknown-linux-gnueabihf-0.4.9":
"08a5f64077331759b1a7c05b632645b56a9e8a42f54485a23d6b49f3f5dcdf6b",
"armv7-unknown-linux-musleabihf-0.4.9":
"b5e497e71693a6eff6c5ceacaadce0979a0b7a08f18882b38f774c79de436c34",
"i686-pc-windows-msvc-0.4.9":
"e24eecd74d1ee3955fc3d14a99769766ffe4933eb51622d1db12fa0bddd2e122",
"i686-unknown-linux-gnu-0.4.9":
"64a539c0cddedd3b5c75290f687e37824a573032f3de4bf3382942b3bc6cc357",
"i686-unknown-linux-musl-0.4.9":
"f21072c59cfe898837533369eae8952954ee1c18d4bd52a5ed0fa5ee72017820",
"powerpc64-unknown-linux-gnu-0.4.9":
"d02d6427583ab1007e5b52580322cf3bd0434e49d4683819230f59adfda1c343",
"powerpc64le-unknown-linux-gnu-0.4.9":
"bda93bd35f1651a7d15c4367b5d35a0ffa88f6c7e527d0bd89324210c23761aa",
"powerpc64le-unknown-linux-musl-0.4.9":
"018503cda7e80d1b0d158800670ef42dd9b819c74102d5ccb91167012552158a",
"s390x-unknown-linux-gnu-0.4.9":
"f35cda4c013a15c833f170c28761fbdf1e244c3ad56b2a1c1516ac09362cc751",
"x86_64-apple-darwin-0.4.9":
"71b5ec02380a413a9ab65f6f5e2433a73aaee95834dbc3c6c451492268471f35",
"x86_64-pc-windows-msvc-0.4.9":
"5d082ee82624e51f3c8c994329277168f427732d46ab59cfbb974bdd83f6fea2",
"x86_64-unknown-linux-gnu-0.4.9":
"4d78a50027f9195db60905b2f50422f417a0aed287f6f94b205e86fecbdb5464",
"x86_64-unknown-linux-musl-0.4.9":
"43a2aacf680cba78f1730bc363995f7d3b27fd10ae77a70cd35f5e30e9c1418c",
"undefined-0.4.8":
"b4a05405382a2017cae922ff1c3636b4d799673ae90162739614101936f1d3ca",
"aarch64-apple-darwin-0.4.8":
"3184e9db9191ca2665feaa72b4b9ed1958feafde81da9573a1320bff6a6a8767",
"aarch64-unknown-linux-gnu-0.4.8":
"72439cb8e248f609e541de90988375a9ca42bb1f4afa9be14b333970acab4c9f",
"aarch64-unknown-linux-musl-0.4.8":
"f4f0740dc1ede0ae49a6f8affc6b1e966b4759877db5add0317090303961d23b",
"arm-unknown-linux-musleabihf-0.4.8":
"26bfc468f9a30ce76577ecf0bc10298f66f04f8893ceda3ab569d9ba18ce899c",
"armv7-unknown-linux-gnueabihf-0.4.8":
"7798c99ca955b272ac534d355b31d6992f1c608c81bf5b106a149144ea39258b",
"armv7-unknown-linux-musleabihf-0.4.8":
"ceb1d908b5cb5a68c848631175c03f5f3960d08ef6f796daabd79f988d153f38",
"i686-pc-windows-msvc-0.4.8":
"1e5fbb0a8677da15ec3f5c46a4c84433071533ffe539c2fe2071c8c20e27b420",
"i686-unknown-linux-gnu-0.4.8":
"535d7b0a09a63e7348b1df1f07806eaca4c080ae4f03605a32fd9177babafa95",
"i686-unknown-linux-musl-0.4.8":
"83c901abf25eab073d310c4a3ec04a2bedbd31a7d4079f6b329c250e85ab9376",
"powerpc64-unknown-linux-gnu-0.4.8":
"2329e55a246e92973175ff9a7276e155b873e566cf0a584c76ff24f1d2eaa28e",
"powerpc64le-unknown-linux-gnu-0.4.8":
"0a19a35c20351d08869e25be8d9913fddc696a9d8effc2f790def7fcf6a4114b",
"powerpc64le-unknown-linux-musl-0.4.8":
"0ba79511f67ba1335321cd31ab8b6ed84ed65ad1be4d39406b245b40f2f7a61e",
"s390x-unknown-linux-gnu-0.4.8":
"7c0a52c4d2c02ad3046b792985f50a55869b73fa4e38b0bc51ab04479a2cc41a",
"x86_64-apple-darwin-0.4.8":
"95f94045898d34e552f43fd65b5a1824cf86873a64e35866a06689dd5de266b2",
"x86_64-pc-windows-msvc-0.4.8":
"0bbb4fd2d8b7a850a295a0f1fb87a77992c85f59d223d964004e36243b6c803f",
"x86_64-unknown-linux-gnu-0.4.8":
"3c2e233746eba77b490024f386d1d20fa09b11717365c8ddd69043729fb71ab2",
"x86_64-unknown-linux-musl-0.4.8":
"5b07df5d9228fb09c31dd1b08e2582ca8df6765705c0fb550b9eb87950d3ca1e",
"undefined-0.4.7":
"2243b3636da44419b6d15df30db138f861a3c36991e9b9eb8ec43146c674df10",
"aarch64-apple-darwin-0.4.7":
"a1fa60ccd00d9702e6d2792810226ce2c17d43807f38ab70c7418763693a3f7e",
"aarch64-unknown-linux-gnu-0.4.7":
"b54ab2370cb726d40896e9e9b71ee08bb93aec656a80413515214699b64eb458",
"aarch64-unknown-linux-musl-0.4.7":
"ec700622902ba26c465b4ff4a304dfdb9c0cd7cbcfe4e5dccba3f8e43f988934",
"arm-unknown-linux-musleabihf-0.4.7":
"3f4a9dffba224b064f8947be8aa12f71aba931badbb2f2b0ad31c4a248f55470",
"armv7-unknown-linux-gnueabihf-0.4.7":
"50d1a6da4ad12cc78bc011e01e9eeb8f881f37699c6b7ca0e3b0578e9553185b",
"armv7-unknown-linux-musleabihf-0.4.7":
"7f1f5918c9634358703f4283c384375294d5f7c80ad7a7ef5cb83a008ac941da",
"i686-pc-windows-msvc-0.4.7":
"cecb8bce8a911438c52ebdfbfbd516c5fa8111ff9c4c609224443b56074c409f",
"i686-unknown-linux-gnu-0.4.7":
"a1117f56ed6e8b99d468fb147782314dc8e6e870d0e49a81f601e5bf61c54422",
"i686-unknown-linux-musl-0.4.7":
"eecb9b2bc451d4eb44b629018fb1dd3cd9b775ff57110be680b75aa208fe8bf7",
"powerpc64-unknown-linux-gnu-0.4.7":
"49569c1a10047dc9275ca439db69861c627ad6c0f906da1263f5925e41f92119",
"powerpc64le-unknown-linux-gnu-0.4.7":
"a6ed76b1349fa098a1d7b54b8a3f05e7b80d15e2ef46302b001025809fc05b60",
"powerpc64le-unknown-linux-musl-0.4.7":
"9f95bbac0b79034be0230325f5056d5964542899e3369d1c93718a1c5d84a6db",
"s390x-unknown-linux-gnu-0.4.7":
"f852e6d71fbbe3a469f8215d3168b754321c09bd574a4ff3c6a12b168ac92640",
"x86_64-apple-darwin-0.4.7":
"3c5df7248b25a688188d6f4a950e615574e87d8aa2dd56577b4325f15bf0ab9b",
"x86_64-pc-windows-msvc-0.4.7":
"5bf8c7a9bda91c8aaa0a7d4aeaa25fe891010cb3336972fb3a58065b668f66e4",
"x86_64-unknown-linux-gnu-0.4.7":
"a391db7b4c0b2c4b54be407df1a90ebba0542db468f25eefc2d56b7ab3282856",
"x86_64-unknown-linux-musl-0.4.7":
"aea262a35d402a183b670f635be80dbe73fc9461aa2c9b57c5a3de538fc00017",
"undefined-0.4.6":
"876a26e7cac5c7d9730ca619e06a117ea48085135412a0400787cef437fc6fcd",
"aarch64-apple-darwin-0.4.6":
"3fa569aad68c8d3f6f96eccfb4def127411f795d819f90c7dbcdb4a3cec04667",
"aarch64-unknown-linux-gnu-0.4.6":
"1c12f6dbe4cc88f17af8cde38d7b8fc7524cbbbe1b405f2b7243737680b87a8d",
"aarch64-unknown-linux-musl-0.4.6":
"d3ade7505a8d8b76e3d022425cd3602323af5ec65373f2fdd30211d25e3b9253",
"arm-unknown-linux-musleabihf-0.4.6":
"cfd84da6f080bcc89313280da1bbb0d8b1c74b830b5f8056e09af00ca0b4cb75",
"armv7-unknown-linux-gnueabihf-0.4.6":
"285ebafea67216c27a3006c618275b6fc20a4643d631981684459aac4ce9e124",
"armv7-unknown-linux-musleabihf-0.4.6":
"045ee86e317c3d82f07ec8685c1d4c983ba25f8284051fecfe76de6732e9ef3f",
"i686-pc-windows-msvc-0.4.6":
"33289a7a2cc369831ae8384f0113f30c614a6be333ebef6abfc487decd50cf95",
"i686-unknown-linux-gnu-0.4.6":
"3038fa755b71b333a1f919a3157dafaace4aaaa8dc2fe5d68d882c026962ad72",
"i686-unknown-linux-musl-0.4.6":
"1638e9acb5dff0170e84cc7c9bb346a8ef2298999a236f1b7f8b8d4d4972431b",
"powerpc64-unknown-linux-gnu-0.4.6":
"fba69a56be4b89179568b957eeed6b78a09ef6e00d9d21cf6f7e59c675983d13",
"powerpc64le-unknown-linux-gnu-0.4.6":
"f14e76ca097ea841af0090bccc4d41015d1d6e839af095384ab24a36ed534bcd",
"powerpc64le-unknown-linux-musl-0.4.6":
"a3bc7c30bd527470a49ba6ac9ab61b992e39c9ee687b1cbfe5d14d314ade17c6",
"s390x-unknown-linux-gnu-0.4.6":
"351e1ec195545f7356f81142e0b7136ccdb7d342a361584dd7fb5c408345d3f1",
"x86_64-apple-darwin-0.4.6":
"6b3971c57414ec91b55febc4d08e2e4724e9aa4c80e787e1a195c827048f9048",
"x86_64-pc-windows-msvc-0.4.6":
"d48c8855f79933ab006b6a930bc611105aa52031f33aa80c32f1765a956dd92a",
"x86_64-unknown-linux-gnu-0.4.6":
"68af9a5c41f38bfc4f625bbdc8a9f3921f7c384324ddd7773f078ddfe94eaa9a",
"x86_64-unknown-linux-musl-0.4.6":
"984a0a07c7a83fc8b21c4b6ac1d81ddb08a5a30c35fd5608b969796a60cdcd25",
"undefined-0.4.5":
"65442da160bc68062dda71a8dac009afff0745788f079cc596799ec24fd0f2ca",
"aarch64-apple-darwin-0.4.5":
"e7e8496b494be710261e7524abeb59d7c92ecff949f33174598425bdd14aa519",
"aarch64-unknown-linux-gnu-0.4.5":
"cf63221a8268116c2472f889e548c8d1ba3d8d0f2f77aa782e89202a2ff0e50d",
"aarch64-unknown-linux-musl-0.4.5":
"f588424a62d0592967f2d467238a6749d3efee0a0d6ba855cd60eba662453efa",
"arm-unknown-linux-musleabihf-0.4.5":
"0938a35cb3b381047f7480da1382da2f10551b5c92aba10f367a83ebaf6cb4bc",
"armv7-unknown-linux-gnueabihf-0.4.5":
"46b7b5e4ee5498e0cb9a1150e68b61823919fab6ff4215f1d8be8e135826458e",
"armv7-unknown-linux-musleabihf-0.4.5":
"7242649738791d9ca51f4afc5016e7ffb1e5f539b496637db6f2ea9afea45e29",
"i686-pc-windows-msvc-0.4.5":
"b6efe473a6cf7f93ae060e040b5d7e9a988d67cbb9e089a4547c7e0ad7ed7323",
"i686-unknown-linux-gnu-0.4.5":
"c296363ec6cc70b029272a449223fbf8992579dd977fa65c16ec338f026254f6",
"i686-unknown-linux-musl-0.4.5":
"3482ad8aa6f8f5b06e3891008c50a53f5ff3de00ff4fbaa4caab040f8f05f11b",
"powerpc64-unknown-linux-gnu-0.4.5":
"0368d675c188d56ba3527af02f63b0cb0179a8db95a62428ef0f5377b6ea72cc",
"powerpc64le-unknown-linux-gnu-0.4.5":
"38c7a636e530114720935c4836faa2e4ca11c9b8c3c150a500158da4a7b60b31",
"powerpc64le-unknown-linux-musl-0.4.5":
"1a33c9841b70b76b148618c910efa1f836e650fb007be1727db189e70f43e007",
"s390x-unknown-linux-gnu-0.4.5":
"d9b8fb73eba7bf4d7addadce76735eee94791442a4e6d5ba46a6bc0478ed96d4",
"x86_64-apple-darwin-0.4.5":
"50b87fa1dfe6526bb602781ccd862d2c8eed77abdc0a47606146f7594fa199a2",
"x86_64-pc-windows-msvc-0.4.5":
"850c5718328883cbf88558d2420b6c82066925e258a6207cef1e5ba3931e5028",
"x86_64-unknown-linux-gnu-0.4.5":
"a23e94ab0fb58beb2e7bc2f1d968fb30939b505f1bdab8df5cd1599c02f93793",
"x86_64-unknown-linux-musl-0.4.5":
"e56d951c90bbff7a1b88c42403cd784af2d0233ea660b8b1b4282af872371f43",
"undefined-0.4.4":
"32746c58071378ae79d5965f546915cbe85e94845c87111d4209ec3437052cb6",
"aarch64-apple-darwin-0.4.4":

View File

@@ -1,4 +1,4 @@
import { promises as fs } from "fs";
import { promises as fs } from "node:fs";
import * as tc from "@actions/tool-cache";
export async function updateChecksums(
filePath: string,

View File

@@ -1,10 +1,10 @@
import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";
import * as exec from "@actions/exec";
import * as path from "path";
import { Architecture, Platform } from "../utils/platforms";
import * as path from "node:path";
import type { Architecture, Platform } from "../utils/platforms";
import { validateChecksum } from "./checksum/checksum";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/utils";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
export async function downloadLatest(
platform: Platform,

View File

@@ -1,18 +1,24 @@
import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";
import * as path from "path";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/utils";
import { Architecture, Platform } from "../utils/platforms";
import * as path from "node:path";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
import type { Architecture, Platform } from "../utils/platforms";
import { validateChecksum } from "./checksum/checksum";
import * as github from "@actions/github";
export function tryGetFromToolCache(
arch: Architecture,
version: string,
): string | undefined {
): { version: string; installedPath: string | undefined } {
core.debug(`Trying to get uv from tool cache for ${version}...`);
const cachedVersions = tc.findAllVersions(TOOL_CACHE_NAME, arch);
core.debug(`Cached versions: ${cachedVersions}`);
return tc.find(TOOL_CACHE_NAME, version, arch);
let resolvedVersion = tc.evaluateVersions(cachedVersions, version);
if (resolvedVersion === "") {
resolvedVersion = version;
}
const installedPath = tc.find(TOOL_CACHE_NAME, resolvedVersion, arch);
return { version: resolvedVersion, installedPath };
}
export async function downloadVersion(
@@ -20,10 +26,11 @@ export async function downloadVersion(
arch: Architecture,
version: string,
checkSum: string | undefined,
githubToken: string | undefined,
): Promise<string> {
githubToken: string,
): Promise<{ version: string; cachedToolDir: string }> {
const resolvedVersion = await resolveVersion(version, githubToken);
const artifact = `uv-${arch}-${platform}`;
let downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${version}/${artifact}`;
let downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${resolvedVersion}/${artifact}`;
if (platform === "pc-windows-msvc") {
downloadUrl += ".zip";
} else {
@@ -36,7 +43,13 @@ export async function downloadVersion(
undefined,
githubToken,
);
await validateChecksum(checkSum, downloadPath, arch, platform, version);
await validateChecksum(
checkSum,
downloadPath,
arch,
platform,
resolvedVersion,
);
let uvDir: string;
if (platform === "pc-windows-msvc") {
@@ -46,6 +59,37 @@ export async function downloadVersion(
const extractedDir = await tc.extractTar(downloadPath);
uvDir = path.join(extractedDir, artifact);
}
return await tc.cacheDir(uvDir, TOOL_CACHE_NAME, version, arch);
const cachedToolDir = await tc.cacheDir(
uvDir,
TOOL_CACHE_NAME,
resolvedVersion,
arch,
);
return { version: resolvedVersion, cachedToolDir };
}
async function resolveVersion(
version: string,
githubToken: string,
): Promise<string> {
if (tc.isExplicitVersion(version)) {
core.debug(`Version ${version} is an explicit version.`);
return version;
}
const availableVersions = await getAvailableVersions(githubToken);
const resolvedVersion = tc.evaluateVersions(availableVersions, version);
if (resolvedVersion === "") {
throw new Error(`No version found for ${version}`);
}
return resolvedVersion;
}
async function getAvailableVersions(githubToken: string): Promise<string[]> {
const octokit = github.getOctokit(githubToken);
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: OWNER,
repo: REPO,
});
return response.map((release) => release.tag_name);
}

View File

@@ -26,7 +26,8 @@ async function saveCache(): Promise<void> {
if (!cacheKey) {
core.warning("Error retrieving cache key from state.");
return;
} else if (matchedKey === cacheKey) {
}
if (matchedKey === cacheKey) {
core.info(`Cache hit occurred on key ${cacheKey}, not saving cache.`);
return;
}

View File

@@ -1,5 +1,5 @@
import * as core from "@actions/core";
import * as path from "path";
import * as path from "node:path";
import {
downloadVersion,
tryGetFromToolCache,
@@ -8,16 +8,18 @@ import { restoreCache } from "./cache/restore-cache";
import { downloadLatest } from "./download/download-latest";
import {
Architecture,
type Architecture,
getArch,
getPlatform,
Platform,
type Platform,
} from "./utils/platforms";
import {
cacheLocalPath,
checkSum,
enableCache,
githubToken,
toolBinDir,
toolDir,
version,
} from "./utils/inputs";
@@ -41,8 +43,10 @@ async function run(): Promise<void> {
);
addUvToPath(setupResult.uvDir);
core.setOutput("uv-version", version);
core.info(`Successfully installed uv version ${version}`);
addToolBinToPath();
setToolDir();
core.setOutput("uv-version", setupResult.version);
core.info(`Successfully installed uv version ${setupResult.version}`);
addMatchers();
setCacheDir(cacheLocalPath);
@@ -50,10 +54,10 @@ async function run(): Promise<void> {
if (enableCache) {
await restoreCache(setupResult.version);
}
process.exit(0);
} catch (err) {
core.setFailed((err as Error).message);
}
process.exit(0);
}
async function setupUv(
@@ -61,29 +65,37 @@ async function setupUv(
arch: Architecture,
versionInput: string,
checkSum: string | undefined,
githubToken: string | undefined,
githubToken: string,
): Promise<{ uvDir: string; version: string }> {
let installedPath: string | undefined;
let cachedToolDir: string;
let version: string;
if (versionInput === "latest") {
const result = await downloadLatest(platform, arch, checkSum, githubToken);
version = result.version;
cachedToolDir = result.cachedToolDir;
const latestResult = await downloadLatest(
platform,
arch,
checkSum,
githubToken,
);
version = latestResult.version;
cachedToolDir = latestResult.cachedToolDir;
} else {
version = versionInput;
installedPath = tryGetFromToolCache(arch, versionInput);
const toolCacheResult = tryGetFromToolCache(arch, versionInput);
version = toolCacheResult.version;
installedPath = toolCacheResult.installedPath;
if (installedPath) {
core.info(`Found uv in tool-cache for ${versionInput}`);
return { uvDir: installedPath, version };
}
cachedToolDir = await downloadVersion(
const versionResult = await downloadVersion(
platform,
arch,
versionInput,
checkSum,
githubToken,
);
cachedToolDir = versionResult.cachedToolDir;
version = versionResult.version;
}
return { uvDir: cachedToolDir, version };
@@ -94,6 +106,33 @@ function addUvToPath(cachedPath: string): void {
core.info(`Added ${cachedPath} to the path`);
}
function addToolBinToPath(): void {
if (toolBinDir !== undefined) {
core.exportVariable("UV_TOOL_BIN_DIR", toolBinDir);
core.info(`Set UV_TOOL_BIN_DIR to ${toolBinDir}`);
core.addPath(toolBinDir);
core.info(`Added ${toolBinDir} to the path`);
} else {
if (process.env.XDG_BIN_HOME !== undefined) {
core.addPath(process.env.XDG_BIN_HOME);
core.info(`Added ${process.env.XDG_BIN_HOME} to the path`);
} else if (process.env.XDG_DATA_HOME !== undefined) {
core.addPath(`${process.env.XDG_DATA_HOME}/../bin`);
core.info(`Added ${process.env.XDG_DATA_HOME}/../bin to the path`);
} else {
core.addPath(`${process.env.HOME}/.local/bin`);
core.info(`Added ${process.env.HOME}/.local/bin to the path`);
}
}
}
function setToolDir(): void {
if (toolDir !== undefined) {
core.exportVariable("UV_TOOL_DIR", toolDir);
core.info(`Set UV_TOOL_DIR to ${toolDir}`);
}
}
function setCacheDir(cacheLocalPath: string): void {
core.exportVariable("UV_CACHE_DIR", cacheLocalPath);
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`);

View File

@@ -1,7 +1,7 @@
import * as github from "@actions/github";
import * as core from "@actions/core";
import { OWNER, REPO } from "./utils/utils";
import { OWNER, REPO } from "./utils/constants";
import * as semver from "semver";
import { updateChecksums } from "./download/checksum/update-known-checksums";

View File

@@ -1,9 +1,57 @@
import * as core from "@actions/core";
import path from "node:path";
export const version = core.getInput("version");
export const checkSum = core.getInput("checksum");
export const enableCache = core.getInput("enable-cache") === "true";
export const cacheSuffix = core.getInput("cache-suffix") || "";
export const cacheLocalPath = core.getInput("cache-local-path");
export const githubToken = core.getInput("github-token");
export const cacheLocalPath = getCacheLocalPath();
export const cacheDependencyGlob = core.getInput("cache-dependency-glob");
export const toolBinDir = getToolBinDir();
export const toolDir = getToolDir();
export const githubToken = core.getInput("github-token");
function getToolBinDir(): string | undefined {
const toolBinDirInput = core.getInput("tool-bin-dir");
if (toolBinDirInput !== "") {
return toolBinDirInput;
}
if (process.platform === "win32") {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}uv-tool-bin-dir`;
}
throw Error(
"Could not determine UV_TOOL_BIN_DIR. Please make sure RUNNER_TEMP is set or provide the tool-bin-dir input",
);
}
return undefined;
}
function getToolDir(): string | undefined {
const toolDirInput = core.getInput("tool-dir");
if (toolDirInput !== "") {
return toolDirInput;
}
if (process.platform === "win32") {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}uv-tool-dir`;
}
throw Error(
"Could not determine UV_TOOL_DIR. Please make sure RUNNER_TEMP is set or provide the tool-dir input",
);
}
return undefined;
}
function getCacheLocalPath(): string {
const cacheLocalPathInput = core.getInput("cache-local-path");
if (cacheLocalPathInput !== "") {
return cacheLocalPathInput;
}
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
}
throw Error(
"Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input",
);
}