.goreleaser.yml

  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      - windows
 24    goarch:
 25      - amd64 # Intel
 26      - arm64 # Apple Silicon
 27    # Environment variables to pass to the Go compiler.
 28    env:
 29      - CGO_ENABLED=0
 30    # Build flags for smaller binaries and reproducible builds.
 31    flags:
 32      - -trimpath
 33    # Linker flags to strip debug information and reduce binary size.
 34    ldflags:
 35      - -s -w -buildid= -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
 36
 37# 'archives' defines how to package the built binaries.
 38# 'archives' defines how to package the built binaries.
 39archives:
 40  - # The archive configuration.
 41    # This will create .tar.gz files.
 42    formats: [tar.gz]
 43
 44    # A template for the archive file names.
 45    # e.g., matcha_1.2.3_darwin_amd64.tar.gz
 46    name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
 47    # Files to include in the archive.
 48    format_overrides:
 49      - goos: windows
 50        formats: ["zip"]
 51    files:
 52      - LICENSE
 53
 54      - README.md
 55
 56# 'snapshot' configures how test releases are named when running on non-tagged commits.
 57snapshot:
 58  version_template: "{{ .Tag }}-next"
 59
 60# 'checksum' creates a file with SHA256 checksums for all artifacts.
 61checksum:
 62  name_template: "checksums.txt"
 63
 64# 'changelog' configures the automatic generation of release notes.
 65changelog:
 66  # Use 'github-native' to leverage GitHub's release notes API.
 67  # This automatically includes contributors and links to PRs/issues.
 68  # Categories are configured in .github/release.yml
 69  use: github-native
 70
 71# 'release' configures the GitHub Release creation.
 72release:
 73  # If set to true, GoReleaser will automatically draft a new release.
 74  # Set to false to automatically publish the release.
 75  draft: false
 76  # If set to true, will mark the release as a pre-release.
 77  prerelease: auto
 78  # Add a footer to the release notes featuring full changelog.
 79  footer: |
 80    ---
 81    This version is also available on **[Snapcraft](https://snapcraft.io/matcha)**, **Homebrew**, **[Flatpak](https://matcha.floatpane.com/matcha.flatpakref)**!
 82
 83    View the [installation instructions](https://docs.matcha.floatpane.com/installation) for more details.
 84
 85# 'brews' configures the Homebrew tap integration.
 86brews:
 87  - # The configuration for your Homebrew tap.
 88    # The name of your formula file will be 'matcha.rb'.
 89    name: matcha
 90    # The GitHub repository for your Homebrew tap.
 91    repository:
 92      owner: floatpane
 93      name: homebrew-matcha
 94      # The token to use for pushing to the tap repository.
 95      # It uses the secret you'll create in your repository settings.
 96      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
 97
 98    # The commit author for the tap update.
 99    commit_author:
100      name: goreleaserbot
101      email: bot@goreleaser.com
102
103    # A description for your formula.
104    description: "A beautiful and functional email client for your terminal."
105    # The homepage URL for your formula.
106    homepage: "https://matcha.floatpane.com"
107
108    # The dependencies for your formula.
109    # Since it's a pre-compiled binary, there are no runtime dependencies.
110    dependencies: []
111
112    # The test block for your formula.
113    # This command will be run by `brew test matcha`.
114    test: |
115      system "#{bin}/matcha --version"
116
117    # The installation instructions for your formula.
118    # This tells Homebrew to just install the binary.
119    install: |
120      bin.install "matcha"
121
122# 'snapcrafts' configures the Snapcraft integration.
123snapcrafts:
124  - # The configuration for your Snapcraft package.
125    name: matcha
126    publish: true
127    summary: "A beautiful and functional email client for your terminal."
128    description: |
129      A beautiful and functional email client for your terminal, built with Go and the charming Bubble Tea TUI library.
130      Never leave your command line to check your inbox or send an email again!
131    grade: stable
132    confinement: strict
133    license: MIT