.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: 1
  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    # Linker flags to strip debug information and reduce binary size.
 30    ldflags:
 31      - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
 32
 33# 'archives' defines how to package the built binaries.
 34archives:
 35  - # The archive configuration.
 36    # This will create .tar.gz files.
 37    format: tar.gz
 38    # A template for the archive file names.
 39    # e.g., matcha_1.2.3_darwin_amd64.tar.gz
 40    name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
 41    # Files to include in the archive.
 42    files:
 43      - LICENSE
 44
 45      - README.md
 46
 47# 'checksum' creates a file with SHA256 checksums for all artifacts.
 48checksum:
 49  name_template: "checksums.txt"
 50
 51# 'snapshot' configures how test releases are named when running on non-tagged commits.
 52snapshot:
 53  name_template: "{{ .Tag }}-next"
 54
 55# 'changelog' configures the automatic generation of release notes.
 56changelog:
 57  sort: asc
 58  filters:
 59    # Exclude commit messages that match these patterns from the changelog.
 60    exclude:
 61      - "^docs:"
 62      - "^test:"
 63      - "Merge branch"
 64
 65# 'release' configures the GitHub Release creation.
 66release:
 67  # If set to true, GoReleaser will automatically draft a new release.
 68  # Set to false to automatically publish the release.
 69  draft: false
 70  # If set to true, will mark the release as a pre-release.
 71  prerelease: auto
 72
 73# 'brews' configures the Homebrew tap integration.
 74brews:
 75  - # The configuration for your Homebrew tap.
 76    # The name of your formula file will be 'matcha.rb'.
 77    name: matcha
 78    # The GitHub repository for your Homebrew tap.
 79    tap:
 80      owner: floatpane
 81      name: homebrew-matcha
 82      # The token to use for pushing to the tap repository.
 83      # It uses the secret you'll create in your repository settings.
 84      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
 85
 86    # The commit author for the tap update.
 87    commit_author:
 88      name: goreleaserbot
 89      email: bot@goreleaser.com
 90
 91    # A description for your formula.
 92    description: "A beautiful and functional email client for your terminal."
 93    # The homepage URL for your formula.
 94    homepage: "https://matcha.floatpane.com"
 95
 96    # The dependencies for your formula.
 97    # Since it's a pre-compiled binary, there are no runtime dependencies.
 98    dependencies: []
 99
100    # The test block for your formula.
101    # This command will be run by `brew test matcha`.
102    test: |
103      system "#{bin}/matcha --version"
104
105    # The installation instructions for your formula.
106    # This tells Homebrew to just install the binary.
107    install: |
108      bin.install "matcha"
109
110# 'snapcrafts' configures the Snapcraft integration.
111snapcrafts:
112  - # The configuration for your Snapcraft package.
113    name: matcha
114    publish: true
115    summary: "A beautiful and functional email client for your terminal."
116    description: |
117      A beautiful and functional email client for your terminal, built with Go and the charming Bubble Tea TUI library.
118      Never leave your command line to check your inbox or send an email again!
119    grade: stable
120    confinement: strict
121    license: MIT