name: release
on:
  push:
    tags:
      - 'v*'
jobs:
  goreleaser:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Setup Go
        uses: actions/setup-go@v4
        with:
          go-version: 1.22.x
      - name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v5
        with:
          version:  2.9.0
          args: release --clean
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
