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