1# This is the configuration file for GoReleaser.
2# It defines how your project should be built, packaged, and released.
3# For more information, see: https://goreleaser.com/customization/
4version: 2
5
6git:
7 ignore_tags:
8 - nightly*
9 - preview*
10
11# The 'before' hook runs commands before the build process starts.
12before:
13 hooks:
14 # Tidy up the go.mod file to ensure all dependencies are clean.
15 - go mod tidy
16
17# 'builds' defines the matrix of binaries to create.
18# cgo is enabled for C-accelerated image processing and base64 wrapping (clib/).
19# Cross-compilation uses zig cc for Linux/Windows and native clang for macOS.
20# The release workflow runs on macos-latest (see .github/workflows/release.yml).
21builds:
22 - id: matcha
23 main: .
24 goos:
25 - linux
26 - darwin
27 - windows
28 goarch:
29 - amd64
30 - arm64
31 flags:
32 - -trimpath
33 ldflags:
34 - -s -w -buildid= -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
35 env:
36 - CGO_ENABLED=1
37 - >-
38 {{- if eq .Os "darwin" }}SDKROOT={{ .Env.SDK_PATH }}{{- end }}
39 - >-
40 {{- if eq .Os "darwin" }}MACOSX_DEPLOYMENT_TARGET=11.0{{- end }}
41 - >-
42 {{- if eq .Os "darwin" }}CGO_CFLAGS=-isysroot {{ .Env.SDK_PATH }} -mmacosx-version-min=11.0{{- end }}
43 - >-
44 {{- if eq .Os "darwin" }}CGO_LDFLAGS=-isysroot {{ .Env.SDK_PATH }}
45 {{- else if eq .Os "linux" }}CGO_LDFLAGS=-L{{ .Env.PCSC_DIR }}/lib/{{ .Arch }}
46 {{- end }}
47 - >-
48 {{- if eq .Os "darwin" }}
49 {{- if eq .Arch "amd64"}}CC=clang -arch x86_64 -isysroot {{ .Env.SDK_PATH }}{{- end }}
50 {{- if eq .Arch "arm64"}}CC=clang -arch arm64 -isysroot {{ .Env.SDK_PATH }}{{- end }}
51 {{- else if eq .Os "linux" }}
52 {{- if eq .Arch "amd64" }}CC=zig cc -target x86_64-linux-musl -lc{{- end }}
53 {{- if eq .Arch "arm64"}}CC=zig cc -target aarch64-linux-musl -lc{{- end }}
54 {{- else if eq .Os "windows" }}
55 {{- if eq .Arch "amd64" }}CC=zig cc -target x86_64-windows-gnu -lc{{- end }}
56 {{- if eq .Arch "arm64"}}CC=zig cc -target aarch64-windows-gnu -lc{{- end }}
57 {{- end }}
58
59# 'archives' defines how to package the built binaries.
60# 'archives' defines how to package the built binaries.
61archives:
62 - # The archive configuration.
63 # This will create .tar.gz files.
64 formats: [tar.gz]
65
66 # A template for the archive file names.
67 # e.g., matcha_1.2.3_darwin_amd64.tar.gz
68 name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
69 # Files to include in the archive.
70 format_overrides:
71 - goos: windows
72 formats: ["zip"]
73 files:
74 - LICENSE
75
76 - README.md
77
78# 'snapshot' configures how test releases are named when running on non-tagged commits.
79snapshot:
80 version_template: "{{ .Tag }}-next"
81
82# 'checksum' creates a file with SHA256 checksums for all artifacts.
83checksum:
84 name_template: "checksums.txt"
85
86# 'changelog' configures the automatic generation of release notes.
87changelog:
88 # Use 'github-native' to leverage GitHub's release notes API.
89 # This automatically includes contributors and links to PRs/issues.
90 # Categories are configured in .github/release.yml
91 use: github-native
92
93# 'release' configures the GitHub Release creation.
94release:
95 # If set to true, GoReleaser will automatically draft a new release.
96 # Set to false to automatically publish the release.
97 draft: false
98 # If set to true, will mark the release as a pre-release.
99 prerelease: auto
100 # Add a footer to the release notes featuring full changelog.
101 footer: |
102 ---
103 This version is also available on **[Snapcraft](https://snapcraft.io/matcha)**, **Homebrew**, **[Flatpak](https://matcha.email/matcha.flatpakref)**!
104
105 View the [installation instructions](https://docs.matcha.email/installation) for more details.
106
107# 'nix' configures the Nix flake publication.
108# Generates a default.nix per release fetching prebuilt tarballs,
109# pushes to floatpane/nix-matcha. Users install with:
110# nix profile install github:floatpane/nix-matcha
111nix:
112 - name: matcha
113 repository:
114 owner: floatpane
115 name: nix-matcha
116 branch: main
117 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
118 commit_author:
119 name: Floatpane Bot
120 email: us@floatpane.com
121 commit_msg_template: "matcha: bump to {{ .Tag }}"
122 homepage: "https://matcha.email"
123 description: "Beautiful and functional email client for the terminal"
124 license: "mit"
125 install: |
126 mkdir -p $out/bin
127 cp -vr ./matcha $out/bin/matcha
128
129# 'brews' configures the Homebrew tap integration.
130brews:
131 - # The configuration for your Homebrew tap.
132 # The name of your formula file will be 'matcha.rb'.
133 name: matcha
134 # The GitHub repository for your Homebrew tap.
135 repository:
136 owner: floatpane
137 name: homebrew-matcha
138 # The token to use for pushing to the tap repository.
139 # It uses the secret you'll create in your repository settings.
140 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
141
142 # The commit author for the tap update.
143 commit_author:
144 name: Floatpane Bot
145 email: us@floatpane.com
146
147 # A description for your formula.
148 description: "A beautiful and functional email client for your terminal."
149 # The homepage URL for your formula.
150 homepage: "https://matcha.email"
151
152 # The dependencies for your formula.
153 # Since it's a pre-compiled binary, there are no runtime dependencies.
154 dependencies: []
155
156 # The test block for your formula.
157 # This command will be run by `brew test matcha`.
158 test: |
159 system "#{bin}/matcha --version"
160
161 # The installation instructions for your formula.
162 # This tells Homebrew to just install the binary.
163 install: |
164 bin.install "matcha"
165# 'winget' configures the WinGet manifest generation and publication.
166winget:
167 - # Name of the package in WinGet.
168 name: matcha
169 # Unique package identifier used by WinGet.
170 package_identifier: floatpane.matcha
171 # WinGet publisher metadata.
172 publisher: floatpane
173 publisher_url: "https://matcha.email"
174 publisher_support_url: "https://github.com/floatpane/matcha/issues"
175
176 # Package metadata.
177 short_description: "A beautiful and functional email client for your terminal."
178 description: |
179 A beautiful and functional email client for your terminal, built with Go and the charming Bubble Tea TUI library.
180 Never leave your command line to check your inbox or send an email again!
181 homepage: "https://matcha.email"
182 license: MIT
183 tags:
184 - email
185 - terminal
186 - tui
187
188 # Use release changelog as WinGet release notes.
189 release_notes: "{{ .Changelog }}"
190
191 # Commit to a feature branch in winget-pkgs and open a PR.
192 repository:
193 owner: floatpane
194 name: winget-pkgs
195 branch: "{{ .ProjectName }}-{{ .Version }}"
196 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
197 pull_request:
198 enabled: true
199 base:
200 owner: microsoft
201 name: winget-pkgs
202 branch: master
203
204 # Commit author for manifest updates.
205 commit_author:
206 name: goreleaserbot
207 email: bot@goreleaser.com
208
209# Snapcraft is handled separately in the release workflow (requires Ubuntu).
210# See .github/workflows/release.yml