name: Continuous Delivery

on:
  push:
    tags:
      - "v*"

jobs:
  goreleaser:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Unshallow repo
        run: git fetch --prune --unshallow
      - name: Setup Go
        uses: actions/setup-go@v6
        with:
          go-version: 1.24.x
      - name: Run goreleaser
        uses: goreleaser/goreleaser-action@v1
        with:
          distribution: goreleaser
          version: v1.17.2
          args: release --clean
        env:
          GITHUB_TOKEN: ${{secrets.TOKEN_GITHUB}}
