.goreleaser.yaml•3.18 kB
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
# Custom ldflags.
# For more info refer to: https://internal.go.dev/cmd/go#hdr-Compile_packages_and_dependencies
# and https://internal.go.dev/cmd/link
#
# Default: '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser'.
# Templates: allowed.
ldflags:
- -s
- -w
- -X {{ .ModulePath }}/internal/version.Number={{ .Version }}
- -X {{ .ModulePath }}/internal/version.GitCommit={{ .Commit }}
- -X {{ .ModulePath }}/internal/version.BuildDate={{ .Date }}
# GOOS list to build for.
# For more info refer to: https://internal.go.dev/cmd/go#hdr-Environment_variables
#
# Default: [ 'darwin', 'linux', 'windows' ].
goos:
- linux
- windows
- darwin
# GOARCH to build for.
# For more info refer to: https://internal.go.dev/cmd/go#hdr-Environment_variables
#
# Default: [ '386', 'amd64', 'arm64' ].
goarch:
- 386
- amd64
- arm64
# List of combinations of GOOS + GOARCH + GOARM to ignore.
ignore:
- goos: darwin
goarch: 386
archives:
- formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
# use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]
checksum:
# Disable the generation/upload of the checksum file.
disable: true
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
# You can change the name of the release.
#
# Default: '{{.Tag}}' ('{{.PrefixedTag}}' on Pro).
# Templates: allowed.
name_template: '{{ .Version }} / {{ .Now.Format "2006-01-02" }}'
# If set to true, will not auto-publish the release.
# Note: all GitHub releases start as drafts while artifacts are uploaded.
# Available only for GitHub and Gitea.
draft: false
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
# Default: false.
prerelease: true
# If set to false, will NOT mark the release as "latest".
# This prevents it from being shown at the top of the release list,
# and from being returned when calling https://api.github.com/repos/OWNER/REPO/releases/latest.
#
# Available only for GitHub.
#
# Default: true.
# Templates: allowed. (Since v2.6)
make_latest: false