@jbrunton/gha-installer

GitHub Actions Installer

Usage no npm install needed!

<script type="module">
  import jbruntonGhaInstaller from 'https://cdn.skypack.dev/@jbrunton/gha-installer';
</script>

README

GitHub Actions Installer

Build Examples Maintainability Test Coverage

Utility classes for creating GitHub actions for downloading and caching binary files. It provides a couple of specific conveniences:

  1. 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.
  2. 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 the latest 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: