project_name: charm

env:
  - GO111MODULE=on
  - CGO_ENABLED=0

before:
  hooks:
    - go mod download

builds:
  - id: "charm"
    binary: "charm"
    dir: ./cmd/charm
    ldflags: -s -w -X main.Version={{ .Version }} -X main.CommitSHA={{ .Commit }}
    goos:
      - linux
      - freebsd
      - openbsd
      - darwin
      - windows
    goarch:
      - amd64
      - arm64
      - 386
      - arm
    goarm:
      - 6
      - 7

archives:
  - id: default
    builds:
      - charm
    format_overrides:
      - goos: windows
        format: zip
    replacements:
      windows: Windows
      darwin: Darwin
      386: i386
      amd64: x86_64

nfpms:
  - builds:
      - charm

    vendor: charmbracelet
    homepage: "https://charm.sh/"
    maintainer: "Christian Rocha <christian@charm.sh>"
    description: "Manage your Charm account and encrypt/decrypt data"
    license: MIT
    formats:
      - apk
      - deb
      - rpm
    bindir: /usr/bin

brews:
  - goarm: 6
    tap:
      owner: charmbracelet
      name: homebrew-tap
    commit_author:
      name: "Christian Rocha"
      email: "christian@charm.sh"
    homepage: "https://charm.sh/"
    description: "Manage your Charm account and encrypt/decrypt data"

signs:
  - artifacts: checksum

checksum:
  name_template: "checksums.txt"
snapshot:
  name_template: "{{ .Tag }}-next"
changelog:
  sort: asc
  filters:
    exclude:
      - "^docs:"
      - "^test:"
