name: Build & Upload
inputs:
  id:
    description: artifact name
    required: true
  cmd:
    description: command to run
    required: true
  out:
    description: path to output file
    required: true
runs:
  using: composite
  steps:
    - name: compile
      run: ${{ inputs.cmd }}
      shell: bash
    - name: archive
      run: tar -cvf ${{ inputs.out }}.tar ${{ inputs.out }}
      shell: bash
    - name: upload
      uses: actions/upload-artifact@v4
      with:
        name: ${{ inputs.id }}
        path: ${{ inputs.out }}.tar
