{"id":16001622,"url":"https://github.com/pbrisbin/setup-tool-action","last_synced_at":"2025-03-17T19:31:56.457Z","repository":{"id":65161260,"uuid":"574549262","full_name":"pbrisbin/setup-tool-action","owner":"pbrisbin","description":"Generic action for installation of any tool that offers pre-compiled binaries for download","archived":false,"fork":false,"pushed_at":"2024-10-30T01:15:29.000Z","size":927,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-30T03:53:36.541Z","etag":null,"topics":["actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbrisbin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-05T14:55:46.000Z","updated_at":"2024-10-30T01:15:32.000Z","dependencies_parsed_at":"2024-03-08T01:44:08.237Z","dependency_job_id":"d43e32f5-23f8-46c4-b2f7-cb023c78d687","html_url":"https://github.com/pbrisbin/setup-tool-action","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"0f1ba8776ed87b7f289ee39ce921ade54b8f33ee"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrisbin%2Fsetup-tool-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrisbin%2Fsetup-tool-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrisbin%2Fsetup-tool-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrisbin%2Fsetup-tool-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbrisbin","download_url":"https://codeload.github.com/pbrisbin/setup-tool-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878477,"owners_count":20362433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions"],"created_at":"2024-10-08T09:45:12.806Z","updated_at":"2025-03-17T19:31:56.451Z","avatar_url":"https://github.com/pbrisbin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setup Tool Action\n\nGeneric action for installation of any tool that offers pre-compiled binaries\nfor download.\n\n## Motivation\n\n[`@actions/tool-cache`][tc] exists to help download pre-compiled binaries and\nadd them to `$PATH`. However, its ergonomics are such that distinct actions for\nspecific tools are necessary to wrap it into something useful. For the most\npart, the wrapping is required to manage variation in the release URLs such as\nthe position and names used for things like \"os\" or \"architecture\".\n\n[tc]: https://github.com/actions/toolkit/tree/main/packages/tool-cache\n\nThis doesn't scale. Instead, this action abstracts over that and offers good\nergonomics for users to specify any variation directly via `inputs`. This should\nallow the action to be used easily for _any_ such case, and obviate any\ntool-specific actions or support cases for which a tool-specific action doesn't\nexist, without having to create one.\n\n## Types\n\nThe [`action-types`](action-types.yml) allows using this action with\n[github-workflows-kt][kt], which allows writing workflow files in a type-safe\nKotlin DSL.\n\n[kt]: https://github.com/typesafegithub/github-workflows-kt\n\n## Usage\n\nLook at the typical URLs for the binary assets you intend to install. Compare\nwhat you see to the default values for `os`, `arch`, and `ext` for the runners\nyou plan to use:\n\n| Runner           | Platform / {os} | Arch / {arch} | {ext}    |\n| ---------------- | --------------- | ------------- | -------- |\n| `ubuntu-latest`  | `linux`         | `x64`         | `tar.gz` |\n| `macos-latest`   | `darwin`        | `arm64`       | `tar.gz` |\n| `windows-latest` | `win32`         | `x64`         | `zip`    |\n\nIf the values are correct across all the runners you use, you can do the\nfollowing:\n\n```yaml\nsteps:\n  - uses: pbrisbin/setup-tool-action@v2\n    with:\n      name: my-tool\n      version: 1.0.0\n      url: \"http://releases.my-tool.com/{name}-{version}.{os}-{arch}.{ext}\"\n```\n\nIf the values are _not_ correct, you can supply additional inputs to correct\nthem.\n\nLet's say you are only installing on Linux, and it uses `x86_64` for `arch`:\n\n```yaml\nsteps:\n  - uses: pbrisbin/setup-tool-action@v2\n    with:\n      name: my-tool\n      version: 1.0.0\n      url: \"http://releases.my-tool.com/{name}-{version}.{os}-{arch}.{ext}\"\n      arch: x86_64\n```\n\nAll inputs besides `name` and `version` have suffixed versions that can be used\nto supply _different_ values by `platform` and/or `arch`:\n\n- `\u003cinput\u003e-\u003cplatform\u003e-\u003carch\u003e`\n- `\u003cinput\u003e-\u003carch\u003e`\n- `\u003cinput\u003e-\u003cplatform\u003e`\n- `\u003cinput\u003e`\n\nThe first match found is used.\n\nNow let's say you were installing on Linux and MacOS, and you only want to\nchange the `arch` for Linux, that would look like:\n\n```yaml\nsteps:\n  - uses: pbrisbin/setup-tool-action@v2\n    with:\n      name: my-tool\n      version: 1.0.0\n      url: \"http://releases.my-tool.com/{name}-{version}.{os}-{arch}.{ext}\"\n      arch-linux: x86_64\n```\n\nAs a final example, let's also say this tool uses the legacy term `osx` for\nMacOS artifacts:\n\n```yaml\nsteps:\n  - uses: pbrisbin/setup-tool-action@v2\n    with:\n      name: my-tool\n      version: 1.0.0\n      url: \"http://releases.my-tool.com/{name}-{version}.{os}-{arch}.{ext}\"\n      os-darwin: osx\n      arch-linux: x86_64\n```\n\nFor more complex examples, see below or the project's test suite.\n\n\u003c!-- action-docs-inputs action=\"action.yml\" --\u003e\n\n## Inputs\n\n| name                      | description                                                                                                                                                                                                                                                                                                                                                                                                                   | required | default               |\n| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------------- |\n| `name`                    | \u003cp\u003eName of the tool\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                                                       | `true`   | `\"\"`                  |\n| `version`                 | \u003cp\u003eVersion of the tool\u003c/p\u003e \u003cp\u003eRequired unless \u003ccode\u003eurl\u003c/code\u003e is to a GitHub release asset, in which case the latest release will be looked up if left blank.\u003c/p\u003e                                                                                                                                                                                                                                                            | `false`  | `\"\"`                  |\n| `url`                     | \u003cp\u003eURL to installation archive. This value may contain interpolations for name, version, os, arch, and extension.\u003c/p\u003e \u003cp\u003e\u003ccode\u003ehttp://example.com/binaries/{name}/{version}.{os}_{arch}.{ext}\u003c/code\u003e\u003c/p\u003e \u003cp\u003e\u003ccode\u003e{name}\u003c/code\u003e and \u003ccode\u003e{version}\u003c/code\u003e will match the other inputs. \u003ccode\u003e{os}\u003c/code\u003e, \u003ccode\u003e{arch}\u003c/code\u003e and \u003ccode\u003e{ext}\u003c/code\u003e, will be inferred, but can be changed by setting additional inputs.\u003c/p\u003e | `false`  | `\"\"`                  |\n| `subdir`                  | \u003cp\u003eSubdirectory within the archive to find the executable(s). Supports the same interpolations as \u003ccode\u003eurl\u003c/code\u003e.\u003c/p\u003e                                                                                                                                                                                                                                                                                                       | `false`  | `\"\"`                  |\n| `os`                      | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use instead of \u003ccode\u003eprocess.platform\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                      | `false`  | `\"\"`                  |\n| `arch`                    | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use instead of \u003ccode\u003eprocess.arch\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                        | `false`  | `\"\"`                  |\n| `ext`                     | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use instead of inferring\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                         | `false`  | `\"\"`                  |\n| `no-extract`              | \u003cp\u003eDo not extract the asset as an archive. Rather, expect that it represents the (only) binary itself. It will be downloaded, cached, and available on \u003ccode\u003e$PATH\u003c/code\u003e as \u003ccode\u003e{name}\u003c/code\u003e.\u003c/p\u003e                                                                                                                                                                                                                         | `false`  | `\"\"`                  |\n| `url-darwin`              | \u003cp\u003e\u003ccode\u003eurl\u003c/code\u003e when \u003ccode\u003eplatform==darwin\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                    | `false`  | `\"\"`                  |\n| `url-linux`               | \u003cp\u003e\u003ccode\u003eurl\u003c/code\u003e when \u003ccode\u003eplatform==linux\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                     | `false`  | `\"\"`                  |\n| `url-win32`               | \u003cp\u003e\u003ccode\u003eurl\u003c/code\u003e when \u003ccode\u003eplatform==win32\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                     | `false`  | `\"\"`                  |\n| `url-x64`                 | \u003cp\u003e\u003ccode\u003eurl\u003c/code\u003e when \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                           | `false`  | `\"\"`                  |\n| `url-darwin-x64`          | \u003cp\u003e\u003ccode\u003eurl\u003c/code\u003e when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                         | `false`  | `\"\"`                  |\n| `url-darwin-arm64`        | \u003cp\u003e\u003ccode\u003eurl\u003c/code\u003e when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                       | `false`  | `\"\"`                  |\n| `url-linux-x64`           | \u003cp\u003e\u003ccode\u003eurl\u003c/code\u003e when \u003ccode\u003eplatform==linux\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                          | `false`  | `\"\"`                  |\n| `url-win32-x64`           | \u003cp\u003e\u003ccode\u003eurl\u003c/code\u003e when \u003ccode\u003eplatform==win33\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                          | `false`  | `\"\"`                  |\n| `subdir-darwin`           | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003eplatform==darwin\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                 | `false`  | `\"\"`                  |\n| `subdir-linux`            | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003eplatform==linux\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                  | `false`  | `\"\"`                  |\n| `subdir-win32`            | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003eplatform==win32\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                  | `false`  | `\"\"`                  |\n| `subdir-x64`              | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                        | `false`  | `\"\"`                  |\n| `subdir-arm64`            | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                      | `false`  | `\"\"`                  |\n| `subdir-darwin-x64`       | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                      | `false`  | `\"\"`                  |\n| `subdir-darwin-arm64`     | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                    | `false`  | `\"\"`                  |\n| `subdir-linux-x64`        | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003eplatform==linux\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                       | `false`  | `\"\"`                  |\n| `subdir-win32-x64`        | \u003cp\u003e\u003ccode\u003esubdir\u003c/code\u003e when \u003ccode\u003eplatform==win33\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                       | `false`  | `\"\"`                  |\n| `os-darwin`               | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                            | `false`  | `\"\"`                  |\n| `os-linux`                | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003eplatform==linux\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                             | `false`  | `\"\"`                  |\n| `os-win32`                | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003eplatform==win32\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                             | `false`  | `\"\"`                  |\n| `os-x64`                  | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                   | `false`  | `\"\"`                  |\n| `os-arm64`                | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                 | `false`  | `\"\"`                  |\n| `os-darwin-x64`           | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                 | `false`  | `\"\"`                  |\n| `os-darwin-arm64`         | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                               | `false`  | `\"\"`                  |\n| `os-linux-x64`            | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003eplatform==linux\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                  | `false`  | `\"\"`                  |\n| `os-win32-x64`            | \u003cp\u003e\u003ccode\u003e{os}\u003c/code\u003e to use when \u003ccode\u003eplatform==win32\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                  | `false`  | `\"\"`                  |\n| `arch-darwin`             | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                          | `false`  | `\"\"`                  |\n| `arch-linux`              | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003eplatform==linux\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                           | `false`  | `\"\"`                  |\n| `arch-win32`              | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003eplatform==win32\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                           | `false`  | `\"\"`                  |\n| `arch-x64`                | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                 | `false`  | `\"\"`                  |\n| `arch-arm64`              | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                               | `false`  | `\"\"`                  |\n| `arch-darwin-x64`         | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                               | `false`  | `\"\"`                  |\n| `arch-darwin-arm64`       | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                             | `false`  | `\"\"`                  |\n| `arch-linux-x64`          | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003eplatform==linux\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                | `false`  | `\"\"`                  |\n| `arch-win32-x64`          | \u003cp\u003e\u003ccode\u003e{arch}\u003c/code\u003e to use when \u003ccode\u003eplatform==win32\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                | `false`  | `\"\"`                  |\n| `ext-darwin`              | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                           | `false`  | `\"\"`                  |\n| `ext-linux`               | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003eplatform==linux\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                            | `false`  | `\"\"`                  |\n| `ext-win32`               | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003eplatform==win32\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                            | `false`  | `\"\"`                  |\n| `ext-x64`                 | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                  | `false`  | `\"\"`                  |\n| `ext-arm64`               | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                                                | `false`  | `\"\"`                  |\n| `ext-darwin-x64`          | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                | `false`  | `\"\"`                  |\n| `ext-darwin-arm64`        | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003eplatform==darwin\u003c/code\u003e and \u003ccode\u003earch==arm64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                              | `false`  | `\"\"`                  |\n| `ext-linux-x64`           | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003eplatform==linux\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                 | `false`  | `\"\"`                  |\n| `ext-win32-x64`           | \u003cp\u003e\u003ccode\u003e{ext}\u003c/code\u003e to use when \u003ccode\u003eplatform==win33\u003c/code\u003e and \u003ccode\u003earch==x64\u003c/code\u003e\u003c/p\u003e                                                                                                                                                                                                                                                                                                                                 | `false`  | `\"\"`                  |\n| `github-token`            | \u003cp\u003eIf present, and \u003ccode\u003eurl\u003c/code\u003e is to a GitHub release asset, we will assume it's private and use this token to download the asset through the GitHub API.\u003c/p\u003e \u003cp\u003ehttps://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#get-a-release-asset\u003c/p\u003e                                                                                                                                                           | `false`  | `\"\"`                  |\n| `github-token-for-latest` | \u003cp\u003eToken used for looking up a latest release when \u003ccode\u003eversion\u003c/code\u003e is blank, \u003ccode\u003eurl\u003c/code\u003e is to a GitHub release asset, and \u003ccode\u003egithub-token\u003c/code\u003e is not set. This is to avoid rate limits when interacting with public releases.\u003c/p\u003e                                                                                                                                                                            | `false`  | `${{ github.token }}` |\n\n\u003c!-- action-docs-inputs action=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-outputs action=\"action.yml\" --\u003e\n\n## Outputs\n\n| name        | description                                                                                                                                                                                                  |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `directory` | \u003cp\u003eDirectory that was added to \u003ccode\u003e$PATH\u003c/code\u003e as result of setup.\u003c/p\u003e                                                                                                                                    |\n| `file`      | \u003cp\u003eThis is always \u003ccode\u003eoutputs.directory/inputs.name\u003c/code\u003e, which will \u003cem\u003eusually\u003c/em\u003e match the path to the downloaded and extracted binary. Only use this output if you expect that to be the case.\u003c/p\u003e |\n\n\u003c!-- action-docs-outputs action=\"action.yml\" --\u003e\n\n## GitHub Release Assets\n\nOne common use-case for this action is to download assets attached to GitHub\nreleases. Two additional features are supported for this use case:\n\n1. Private GitHub Repositories\n2. Downloading \"Latest\"\n\nBoth features are available if-and-only-if the `url` input matches:\n\n```\nhttps://github.com/{owner}/{repo}/releases/download/{tag}/{name}\n```\n\n### Releases in Private GitHub Repositories\n\nIf `url` matches the given pattern, and the `github-token` input is set, the\naction will parse the `url` for `owner/repo`, `tag` and asset `name`, then use\nthe GitHub API to find the correct `/releases/assets/{asset-id}` URL and then\ndownload that, all using the given token.\n\n### Downloading \"Latest\"\n\nIf `url` matches the given pattern, and `version` is left blank, the action will\nparse the `url` for `owner/repo` and query the `/releases/latest` API endpoint,\nusing the returned release's `tag_name` as `version`.\n\n\u003e [!IMPORTANT]\n\u003e The `tag_name` will have any `v`-prefix dropped. This is because it's common\n\u003e to have release tags with a `v` prefix, but to need to use the unprefixed\n\u003e value within the download URLs. See the HLint example in our own CI.\n\nThis API request will be made with `github-token` if set (i.e if it's a private\nrepository) or the `github-token-for-latest` input, which defaults to\n`github.token`. You shouldn't have to change this default as the token in that\ncase is only necessary to avoid rate limits on public resources.\n\n## Examples\n\n### HLint\n\n```yaml\nwith:\n  name: \"hlint\"\n  version: \"3.5\"\n  url: \"https://github.com/ndmitchell/{name}/releases/download/v{version}/{name}-{version}-{arch}-{os}.{ext}\"\n  subdir: \"{name}-{version}\"\n  os-darwin: osx\n  os-win32: windows\n  arch-x64: x86_64\n```\n\n**Can replace**: https://github.com/haskell-actions/hlint-setup\n\n### Dead Man's Snitch Field Agent\n\n```yaml\nwith:\n  name: dms\n  version: latest\n  url: \"https://releases.deadmanssnitch.com/field-agent/{version}/{name}_{os}_{arch}.{ext}\"\n  os-darwin: macos\n  os-win32: windows\n  arch-x64: amd64\n```\n\n**Can replace**: N/A\n\n### Pandoc\n\n```yaml\nwith:\n  name: pandoc\n  version: 2.19.2\n  url: \"https://github.com/jgm/{name}/releases/download/{version}/{name}-{version}-{os}-{arch}.{ext}\"\n  url-darwin: \"https://github.com/jgm/{name}/releases/download/{version}/{name}-{version}-macOS.zip\"\n  subdir: \"{name}-{version}/bin\"\n  subdir-win32: \"{name}-{version}\"\n  os-win32: windows\n  arch-x64: x86_64\n  arch-linux-x64: amd64\n```\n\n**Can replace**: https://github.com/r-lib/actions/tree/v2-branch/setup-pandoc\n\n### More...\n\nIf you use this action successfully for another tool, please open a PR adding it\nto the CI matrix and this README.\n\n---\n\n[LICENSE](./LICENSE) | [CHANGELOG](./CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbrisbin%2Fsetup-tool-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbrisbin%2Fsetup-tool-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbrisbin%2Fsetup-tool-action/lists"}