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.floatpane.com/matcha.flatpakref)**!
104
105 View the [installation instructions](https://docs.matcha.floatpane.com/installation) for more details.
106
107# 'brews' configures the Homebrew tap integration.
108brews:
109 - # The configuration for your Homebrew tap.
110 # The name of your formula file will be 'matcha.rb'.
111 name: matcha
112 # The GitHub repository for your Homebrew tap.
113 repository:
114 owner: floatpane
115 name: homebrew-matcha
116 # The token to use for pushing to the tap repository.
117 # It uses the secret you'll create in your repository settings.
118 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
119
120 # The commit author for the tap update.
121 commit_author:
122 name: goreleaserbot
123 email: bot@goreleaser.com
124
125 # A description for your formula.
126 description: "A beautiful and functional email client for your terminal."
127 # The homepage URL for your formula.
128 homepage: "https://matcha.floatpane.com"
129
130 # The dependencies for your formula.
131 # Since it's a pre-compiled binary, there are no runtime dependencies.
132 dependencies: []
133
134 # The test block for your formula.
135 # This command will be run by `brew test matcha`.
136 test: |
137 system "#{bin}/matcha --version"
138
139 # The installation instructions for your formula.
140 # This tells Homebrew to just install the binary.
141 install: |
142 bin.install "matcha"
143# 'winget' configures the WinGet manifest generation and publication.
144winget:
145 - # Name of the package in WinGet.
146 name: matcha
147 # Unique package identifier used by WinGet.
148 package_identifier: floatpane.matcha
149 # WinGet publisher metadata.
150 publisher: floatpane
151 publisher_url: "https://matcha.floatpane.com"
152 publisher_support_url: "https://github.com/floatpane/matcha/issues"
153
154 # Package metadata.
155 short_description: "A beautiful and functional email client for your terminal."
156 description: |
157 A beautiful and functional email client for your terminal, built with Go and the charming Bubble Tea TUI library.
158 Never leave your command line to check your inbox or send an email again!
159 homepage: "https://matcha.floatpane.com"
160 license: MIT
161 tags:
162 - email
163 - terminal
164 - tui
165
166 # Use release changelog as WinGet release notes.
167 release_notes: "{{ .Changelog }}"
168
169 # Commit to a feature branch in winget-pkgs and open a PR.
170 repository:
171 owner: floatpane
172 name: winget-pkgs
173 branch: "{{ .ProjectName }}-{{ .Version }}"
174 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
175 pull_request:
176 enabled: true
177 base:
178 owner: microsoft
179 name: winget-pkgs
180 branch: master
181
182 # Commit author for manifest updates.
183 commit_author:
184 name: goreleaserbot
185 email: bot@goreleaser.com
186
187# Snapcraft is handled separately in the release workflow (requires Ubuntu).
188# See .github/workflows/release.yml