# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
  hooks:
    # You may remove this if you don't use go modules.
    - go mod tidy
    # you may remove this if you don't need go generate
    - go generate ./...
builds:
  -
    main: .
    id: "lbcd"
    binary: "lbcd"
    env:
      - CGO_ENABLED=0
    flags:
      - -trimpath
    ldflags:
      - -s -w
      - -X main.appBuild={{.Commit}}
    targets:
      - linux_amd64
      - linux_arm64
      - darwin_amd64
      - darwin_arm64
      - windows_amd64
  -
    main: ./cmd/lbcctl
    id: "lbcctl"
    binary: "lbcctl"
    flags:
      - -trimpath
    ldflags:
      - -s -w
      - -X main.appBuild={{.Commit}}
    env:
      - CGO_ENABLED=0
    targets:
      - linux_amd64
      - linux_arm64
      - darwin_amd64
      - darwin_arm64
      - windows_amd64
checksum:
  name_template: 'checksums.txt'
snapshot:
  name_template: "{{ incpatch .Version }}-next"
changelog:
  sort: asc
  filters:
    exclude:
      - '^docs:'
      - '^test:'

release:
  draft: true
  prerelease: auto