name: ci

on:
  push:
    tags:
      - v*

jobs:
  goreleaser:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Set up Go
        uses: actions/setup-go@v6
        with:
          go-version: ">=1.25.1"
      - name: Test code
        run: make test
      - name: Run GoReleaser
        uses: https://github.com/goreleaser/goreleaser-action@v6
        env:
          GITEA_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
        with:
          args: release --clean
