install-binary

May 21, 2024 ยท View on GitHub

CI GitHub Release

This action installs a binary from Github Releases:

  • Automatically downloads and caches the binary, adding it to the PATH.
  • Supports specific release tags and binary names.
  • Particularly useful for installing single-file binaries such as those developed with Go or Rust.

Inputs

NameRequiredDescriptionDefault
repotrueThe GitHub repository in owner/repo format
tagfalseThe release tag to downloadlatest
namefalseThe specific binary name within the release
cachefalseControls whether the binary is cachedfalse
tokenfalseGitHub token, useful for private repositories${{ github.token }}

Usage Examples

Basic Installation

Install the latest binary from a public GitHub repository.

  - uses: sigoden/install-binary@v1
    with:
      repo: sigoden/argc

Installing a Binary with a Specific Tag and Name

Install a specific binary (protoc) from a given release tag (v26.1) in the protocolbuffers/protobuf repository.

  - uses: sigoden/install-binary@v1
    with:
      repo: protocolbuffers/protobuf
      tag: v26.1
      name: protoc

Install a specific binary (wasm-opt) from the WebAssembly/binaryen repository, which contains multiple binaries.

  - uses: sigoden/install-binary@v1
    with:
      repo: WebAssembly/binaryen
      name: wasm-opt

Using a Private Repository

Install a binary from a private repository using a Personal Access Token (PAT).

  - uses: sigoden/install-binary@v1
    with:
      repo: my-org/my-private-repo
      token: ${{ secrets.MY_PAT }}

License

The scripts and documentation in this project are released under the MIT License