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