GitHub Actions Installer
Utility classes for creating GitHub actions for downloading and caching binary files. It provides a couple of specific conveniences:
- An
Installer
class which, when given an app description (i.e. name + version), will check the GitHub tools cache and if necessary download the binary. - A
GitHubReleasesService
class which knows how to query the GitHub API for latest versions ordered by semantic version number. This is important, because if you simply check thelatest
release (according to the GitHub API) in your actions and then patch an older version, users will be given the patch for your older version.
Usage
Add to your project:
npm install @jbrunton/gha-installer
For how to use the library, see the example actions:
- single-app - shows how to install a single app on Linux.
- multi-app - a more complex example that shows how to install multiple apps with different binaries on different platforms.
And in actions available on the GitHub Marketplace:
- jbrunton/setup-gflows - installs a single app on Linux or Mac.
- vmware-tanzu/carvel-setup-action - installs multiple apps on different platforms.