Skip to content
terminal

GitHub Action

Setup HashiCorp Releases

v2.0.0 Latest version

Setup HashiCorp Releases

terminal

Setup HashiCorp Releases

Download and setup binary from releases.hashicorp.com in a GitHub Actions build environment

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup HashiCorp Releases

uses: bloominlabs/setup-hashicorp-releases@v2.0.0

Learn more about this action in bloominlabs/setup-hashicorp-releases

Choose a version

Setup Hashicorp Releases - GitHub Action

This repository contains an action for use with GitHub Actions, which installs a a package from releases.hashicorp.com with a semver-compatible version.

The package is installed into /home/runner/.{package} (or equivalent on Windows) and the bin subdirectory is added to the PATH.

Usage

Install the latest version of the envconsul:

- name: Install envconsul
  uses: bloominlabs/setup-hashicorp-releases@v2
  with:
    package: envconsul

Install the latest (potentially prerelease) version of envconsul

- name: Install envconsul
  uses: bloominlabs/setup-hashicorp-releases@v2
  with:
    package: envconsul
    include_prerelease: true

Install a specific version of the envconsul:

- name: Install envconsul
  uses: bloominlabs/setup-hashicorp-releases@v2
  with:
    package: envconsul
    version: 0.12.1

Install a specific prerelease version of nomad:

- name: Install nomad
  uses: bloominlabs/setup-hashicorp-releases@v2
  with:
    package: nomad
    version: 1.5.0-beta.1
    include_prerelease: true

Install a version that adheres to a semver range

- name: Install envconsul
  uses: bloominlabs/setup-hashicorp-releases@v2
  with:
    package: envconsul
    version: ^0.12.0

Testing

You can test this action locally using act. See the repo for more instructions.

Configuration

The action can be configured with the following arguments:

  • package - The package to install. See https://releases.hashicorp.com/index.json for all available packages.
  • version (optional) - The version of the package to install. Default is latest. Accepts semver style values.
  • license_class (optional) - The type of license required for the package. Either enterprise or oss (default).
  • include_prerelease (optional) - Should prerelease versions be considered when finding the semver match. Default is false.