.goreleaser.yaml

 1# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
 2#
 3# See https://goreleaser.com/customization/ for more information.
 4version: 2
 5project_name: goose
 6
 7before:
 8  hooks:
 9    - go mod tidy
10builds:
11  - env:
12      - CGO_ENABLED=0
13    binary: goose
14    main: ./cmd/goose
15    goos:
16      - linux
17      - windows
18      - darwin
19    goarch:
20      - amd64
21      - arm64
22    ldflags:
23      # The v prefix is stripped by goreleaser, so we need to add it back.
24      # https://goreleaser.com/customization/templates/#fnref:version-prefix
25      - "-s -w -X main.version=v{{ .Version }}"
26
27archives:
28  - format: binary
29    name_template: >-
30      {{ .ProjectName }}_{{- tolower .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
31checksum:
32  name_template: "checksums.txt"
33snapshot:
34  version_template: "{{ incpatch .Version }}-next"
35changelog:
36  use: github-native