pipeline:
  build:
    image: golang:1.19
    commands:
      - go mod tidy
      - go build -o gospt
      - mkdir completions
      - ./gospt completion zsh > completions/gospt_zsh
      - ./gospt completion bash > completions/gospt_bash
      - ./gospt completion fish > completions/gospt_fish

  publish:
    image: goreleaser/goreleaser
    commands:
      - goreleaser release --clean
    secrets: [ gitea_token ]
    when:
      event: tag
