# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2

builds:
  - main: ./cmd/kit
    binary: kit
    env:
      - CGO_ENABLED=0
    goos:
      - darwin
      - linux
      - windows
    goarch:
      - amd64
      - arm64
    ldflags:
      - -s -w
      - -X main.version={{.Version}}
      - -X main.commit={{.Commit}}
      - -X main.date={{.Date}}

archives:
  - formats: [tar.gz]
    name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
    format_overrides:
      - goos: windows
        formats: [zip]

checksum:
  name_template: checksums.txt

release:
  header: |
    ## Installation

    ```bash
    # Bun / npm
    bun add -g @mark3labs/kit
    # or: npm install -g @mark3labs/kit

    # Go install (requires Go 1.26+)
    go install github.com/mark3labs/kit/cmd/kit@latest

    # Or download from assets below
    ```

changelog:
  sort: asc
  use: github
  filters:
    exclude:
      - "^Merge"
      - "^merge"
      - "^wip"
      - "^WIP"
  groups:
    - title: "Features"
      regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
      order: 0
    - title: "Bug Fixes"
      regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
      order: 1
    - title: "Documentation"
      regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
      order: 2
    - title: "Maintenance"
      regexp: '^.*?(chore|refactor|style|ci|build)(\([[:word:]]+\))??!?:.+$'
      order: 3
    - title: "Other Changes"
      order: 999
