mugit/.goreleaser.yaml (view raw)
| 1 | # yaml-language-server: $schema=https://goreleaser.com/static/schema.json |
| 2 | # vim: set ts=2 sw=2 tw=0 |
| 3 | version: 2 |
| 4 | |
| 5 | before: |
| 6 | hooks: |
| 7 | - go mod tidy |
| 8 | |
| 9 | builds: |
| 10 | - env: |
| 11 | - CGO_ENABLED=0 |
| 12 | goos: |
| 13 | - linux |
| 14 | - darwin |
| 15 | - freebsd |
| 16 | - openbsd |
| 17 | goarch: |
| 18 | - amd64 |
| 19 | - arm64 |
| 20 | ldflags: |
| 21 | - -s -w |
| 22 | - -X 'main.Version={{.Version}}' |
| 23 | flags: |
| 24 | - -trimpath |
| 25 | |
| 26 | archives: |
| 27 | - formats: [tar.gz] |
| 28 | name_template: >- |
| 29 | {{ .ProjectName }}_ |
| 30 | {{- title .Os }}_ |
| 31 | {{- if eq .Arch "amd64" }}x86_64 |
| 32 | {{- else if eq .Arch "386" }}i386 |
| 33 | {{- else }}{{ .Arch }}{{ end }} |
| 34 | {{- if .Arm }}v{{ .Arm }}{{ end }} |