name: 'Install cargo-binstall'
description: 'Install the latest version of cargo-binstall tool'

runs:
  using: composite
  steps:
    - name: Install cargo-binstall
      if: runner.os != 'Windows'
      shell: sh
      run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
    - name: Install cargo-binstall
      if: runner.os == 'Windows'
      run: Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content
      shell: powershell