name: Test Binary Builds

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  goreleaser:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Set up Go
        uses: actions/setup-go@v3
        with:
          go-version: ~1.18.1
      -
        name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v1
        with:
          version: latest
          args: release --rm-dist --snapshot
