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