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