name: Release

on:
  push:
    tags:
      - '*'

jobs:
  goreleaser:
    runs-on: ubuntu-20.04
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Unshallow
      run: git fetch --prune --unshallow
    - name: Set up Go
      uses: actions/setup-go@v5.2.0
      with:
        go-version: 1.23.x
    - name: Run GoReleaser
      uses: goreleaser/goreleaser-action@v6.1.0
      with:
        args: release --clean
      env:
        GITHUB_TOKEN: ${{ secrets.GH_TOKEN_SECRETS }}
