inputs:
  all:
    description: 'Install all binaries'
    default: false
  version:
    description: 'Vega version'
  gobin:
    description: 'GOBIN path'
    default: '/home/runner/go/bin'
runs:
  using: 'composite'
  steps:
    - name: Install Vega binaries
      if: ${{ inputs.all }}
      shell: bash
      run: |
        wget 'https://github.com/vegaprotocol/vega/releases/download/${{ env.VEGA_VERSION }}/vega-linux-amd64.zip' -q
        unzip vega-linux-amd64.zip -d ${{ inputs.gobin }}

    - name: Install date-node binaries
      if: ${{ inputs.all  }}
      shell: bash
      run: |
        wget 'https://github.com/vegaprotocol/vega/releases/download/${{ env.VEGA_VERSION }}/data-node-linux-amd64.zip' -q
        unzip data-node-linux-amd64.zip -d ${{ inputs.gobin }}

    - name: Install Vega wallet binaries
      shell: bash
      run: |
        wget 'https://github.com/vegaprotocol/vega/releases/download/${{ env.VEGA_VERSION }}/vegawallet-linux-amd64.zip' -q
        unzip vegawallet-linux-amd64.zip -d ${{ inputs.gobin }}