name: goreleaser-check

on:
  push:
    paths:
      - '.goreleaser*'

jobs:
  goreleaser-check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version: '1.20'
      - name: Install GoReleaser
        uses: goreleaser/goreleaser-action@v3
        with:
          install-only: true
      - name: Check main config file 
        run: goreleaser check -f .goreleaser.yaml
