when:
  - event: push
  - event: pull_request
  - event: tag

steps:
  test:
    image: golang:1.24-alpine
    commands:
      - go mod download
      - go test ./...
    when:
      - event: [push, pull_request]

  release:
    image: goreleaser/goreleaser:latest
    commands:
      - goreleaser release --clean
    environment:
      GITEA_TOKEN:
        from_secret: gitea_token
    when:
      - event: tag

