.goreleaser.yaml RawHistoryFolder
1# GoReleaser config — builds cross-platform binaries and release artifacts
2# for zut. The release workflow runs GoReleaser when a v* tag is pushed.
3version: 2
4
5project_name: zut
6
7# Releases are published on ermite. In CI the runner sets GITHUB_API_URL and
8# GITHUB_SERVER_URL to an address the job can reach; the public URLs are the
9# fallback for a local run. The release workflow also runs on the GitHub
10# mirror, so `zut update` in older builds, which only reads GitHub, still
11# updates: there GoReleaser keeps its github.com defaults.
12github_urls:
13 api: '{{ if eq (index .Env "GITHUB_SERVER_URL") "https://github.com" }}https://api.github.com{{ else }}{{ or (index .Env "GITHUB_API_URL") "https://git.bnema.dev/-/github/api" }}{{ end }}/'
14 upload: '{{ if eq (index .Env "GITHUB_SERVER_URL") "https://github.com" }}https://uploads.github.com{{ else }}{{ or (index .Env "GITHUB_API_URL") "https://git.bnema.dev/-/github/api" }}/uploads{{ end }}/'
15 download: '{{ or (index .Env "GITHUB_SERVER_URL") "https://git.bnema.dev" }}/'
16
17before:
18 hooks:
19 - go mod tidy
20
21builds:
22 - id: zut
23 main: ./cmd/zut
24 binary: zut
25 env:
26 - CGO_ENABLED=0
27 goos: [linux, darwin, windows]
28 goarch: [amd64, arm64]
29 # Windows/arm64 is shipped by Go but rarely used — skip to keep the
30 # release artifact list tidy.
31 ignore:
32 - goos: windows
33 goarch: arm64
34 flags:
35 - -trimpath
36 ldflags:
37 - -s -w
38 - -X main.version={{.Version}}
39 - -X main.commit={{.Commit}}
40 - -X main.date={{.Date}}
41
42archives:
43 - id: zut
44 # Human-friendly name: zut_0.1.0_darwin_arm64.tar.gz
45 name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
46 files:
47 - LICENSE
48 - README.md
49 format_overrides:
50 - goos: windows
51 formats: [zip]
52
53checksum:
54 name_template: "checksums.txt"
55 algorithm: sha256
56
57snapshot:
58 version_template: "{{ incpatch .Version }}-next"
59
60git:
61 # Git's version-aware sort selects semantic versions correctly.
62 tag_sort: -version:refname
63
64changelog:
65 sort: asc
66 use: git
67 filters:
68 # Styling-only commits are neither releasable nor useful release notes.
69 exclude:
70 - "^style:"
71 groups:
72 - title: Added
73 regexp: "^feat(\\([^)]+\\))?!?:"
74 order: 0
75 - title: Fixed
76 regexp: "^fix(\\([^)]+\\))?!?:"
77 order: 1
78 - title: Changed
79 regexp: "^(perf|refactor|build)(\\([^)]+\\))?!?:"
80 order: 2
81 - title: Maintenance
82 regexp: "^(chore|ci)(\\([^)]+\\))?!?:"
83 order: 3
84 - title: Documentation
85 regexp: "^docs(\\([^)]+\\))?!?:"
86 order: 4
87 - title: Tests
88 regexp: "^test(\\([^)]+\\))?!?:"
89 order: 5
90 - title: Other changes
91 order: 999
92
93release:
94 github:
95 owner: bnema
96 name: zut
97 draft: false
98 prerelease: auto
99 header: |
100 ## zut {{ .Tag }}
101
102 Install with:
103
104 ```bash
105 curl -fsSL https://git.bnema.dev/zut/raw/main/install.sh | bash
106 ```
107
108 Or download a binary below, verify it with `checksums.txt`, and add it to your `$PATH`.