name: Go

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
env:
  # Avoid noisy outputs like "tput: No value for $TERM and no -T specified"
  TERM: dumb

jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - name: Set up Go 1.x
      uses: actions/setup-go@v4
      with:
        go-version: ^1.19
      id: go

    - name: Check out code into the Go module directory
      uses: actions/checkout@v4

    - name: Build
      run: make bin

    - name: Upload a Build Artifact
      uses: actions/upload-artifact@v3
      with:
        name: "kompose"
        path: "kompose"
