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
6# The 'before' hook runs commands before the build process starts.
7before:
8 hooks:
9 # Tidy up the go.mod file to ensure all dependencies are clean.
10 - go mod tidy
11
12# 'builds' defines the matrix of binaries to create.
13builds:
14 - # The main build configuration for your CLI.
15 # The binary name will be 'matcha'.
16 id: "matcha"
17 # The main entrypoint of your application.
18 main: .
19 # The Go compiler to use.
20 goos:
21 - linux
22 - darwin # macOS
23 goarch:
24 - amd64 # Intel
25 - arm64 # Apple Silicon
26 # Environment variables to pass to the Go compiler.
27 env:
28 - CGO_ENABLED=0
29 # Build flags for smaller binaries and reproducible builds.
30 flags:
31 - -trimpath
32 # Linker flags to strip debug information and reduce binary size.
33 ldflags:
34 - -s -w -buildid= -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
35
36# 'archives' defines how to package the built binaries.
37# 'archives' defines how to package the built binaries.
38archives:
39 - # The archive configuration.
40 # This will create .tar.gz files.
41 formats: [tar.gz]
42 # A template for the archive file names.
43 # e.g., matcha_1.2.3_darwin_amd64.tar.gz
44 name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
45 # Files to include in the archive.
46 files:
47 - LICENSE
48
49 - README.md
50
51# 'snapshot' configures how test releases are named when running on non-tagged commits.
52snapshot:
53 version_template: "{{ .Tag }}-next"
54
55# 'checksum' creates a file with SHA256 checksums for all artifacts.
56checksum:
57 name_template: "checksums.txt"
58
59# 'changelog' configures the automatic generation of release notes.
60changelog:
61 # Use 'github' to fetch additional metadata like PR authors and linked issues.
62 use: github
63 sort: asc
64 # Group commits by category based on conventional commit prefixes.
65 groups:
66 - title: "New Features"
67 regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
68 order: 0
69 - title: "Bug Fixes"
70 regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
71 order: 1
72 - title: "Performance Improvements"
73 regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
74 order: 2
75 - title: "Refactoring"
76 regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$'
77 order: 3
78 - title: "Build & CI"
79 regexp: '^.*?(build|ci)(\([[:word:]]+\))??!?:.+$'
80 order: 4
81 - title: "Dependencies"
82 regexp: '^.*?chore\(deps\).*$'
83 order: 5
84 - title: "Other Changes"
85 order: 999
86 filters:
87 # Exclude commit messages that match these patterns from the changelog.
88 exclude:
89 - "^docs:"
90 - "^test:"
91 - "^chore:"
92 - "Merge branch"
93 - "Merge pull request"
94 # Include contributor info and abbreviate commit hashes.
95 abbrev: 7
96
97# 'release' configures the GitHub Release creation.
98release:
99 # If set to true, GoReleaser will automatically draft a new release.
100 # Set to false to automatically publish the release.
101 draft: false
102 # If set to true, will mark the release as a pre-release.
103 prerelease: auto
104 # Add a footer to the release notes featuring contributors.
105 footer: |
106 ---
107
108 ## Contributors
109
110 Thanks to all the contributors who made this release possible!
111
112 {{ range .Contributors }}
113 - @{{ .Name }}
114 {{- end }}
115
116 **Full Changelog**: https://github.com/floatpane/matcha/compare/{{ .PreviousTag }}...{{ .Tag }}
117
118# 'brews' configures the Homebrew tap integration.
119brews:
120 - # The configuration for your Homebrew tap.
121 # The name of your formula file will be 'matcha.rb'.
122 name: matcha
123 # The GitHub repository for your Homebrew tap.
124 repository:
125 owner: floatpane
126 name: homebrew-matcha
127 # The token to use for pushing to the tap repository.
128 # It uses the secret you'll create in your repository settings.
129 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
130
131 # The commit author for the tap update.
132 commit_author:
133 name: goreleaserbot
134 email: bot@goreleaser.com
135
136 # A description for your formula.
137 description: "A beautiful and functional email client for your terminal."
138 # The homepage URL for your formula.
139 homepage: "https://matcha.floatpane.com"
140
141 # The dependencies for your formula.
142 # Since it's a pre-compiled binary, there are no runtime dependencies.
143 dependencies: []
144
145 # The test block for your formula.
146 # This command will be run by `brew test matcha`.
147 test: |
148 system "#{bin}/matcha --version"
149
150 # The installation instructions for your formula.
151 # This tells Homebrew to just install the binary.
152 install: |
153 bin.install "matcha"
154
155# 'snapcrafts' configures the Snapcraft integration.
156snapcrafts:
157 - # The configuration for your Snapcraft package.
158 name: matcha
159 publish: true
160 summary: "A beautiful and functional email client for your terminal."
161 description: |
162 A beautiful and functional email client for your terminal, built with Go and the charming Bubble Tea TUI library.
163 Never leave your command line to check your inbox or send an email again!
164 grade: stable
165 confinement: strict
166 license: MIT