Skip to content

Commit

Permalink
Add GoReleaser configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hslatman committed Jul 25, 2021
1 parent 8e6e56b commit 8eccfca
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# This is a .goreleaser.yml file which configures the behaviour for GoReleaser
# Make sure to check the documentation at http://goreleaser.com


# The project name is used in the name of the Brew formula, archives, etc.
# If none is given, it will be inferred from the name of the GitHub, GitLab, or Gitea release.
# https://goreleaser.com/customization/project/
project_name: mud


# https://goreleaser.com/customization/build/
builds:
- id: mud
# Path to project's (sub)directory containing Go code.
# This is the working directory for the Go build command(s).
# Default is `.`.
dir: .
# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
# binary: "extase_{{.Tag}}_{{replace .Target "amd64" "test"}}"
#binary: 'mud_{{.Tag}}_{{replace .Target "darwin" "macos"}}'
# Custom environment variables to be set during the builds.
# Default is empty.
env:
- CGO_ENABLED=0
# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386, amd64 and arm64.
goarch:
- amd64
# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin and linux.
goos:
# - linux
# - windows
- darwin
# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
# .XXX variables come from GoReleaser name templates, see https://goreleaser.com/customization/templates/
#ldflags:
# - -s -w -X main.version={{.Tag}} -X main.date={{.Date}} -X main.goVersion={{.Env.GO_VERSION}} -X main.platform={{.Os}}/{{.Arch}} -X main.commit={{.Commit}}


# The binaries built will be archived together with the README and LICENSE files into a tar.gz file.
# In the archives section you can customize the archive name, additional files, and format.
# https://goreleaser.com/customization/archive/
archives:
- id: mud
# Builds reference which build instances should be archived in this archive.
builds:
- mud
# Archive format. Valid options are `tar.gz`, `tar.xz`, `gz`, `zip` and `binary`.
# If format is `binary`, no archives are created and the binaries are instead
# uploaded directly.
# Default is `tar.gz`.
format: binary
# Archive name template.
# Defaults:
# - if format is `tar.gz`, `tar.xz`, `gz` or `zip`:
# - `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}`
# - if format is `binary`:
# - `{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}`
name_template: "{{.Binary}}"
# Replacements for GOOS and GOARCH in the archive name.
# Keys should be valid GOOSs or GOARCHs.
# Values are the respective replacements.
# Default is empty.
#replacements:
# darwin: macos

# - id: extase_php
# # Can be used to change the archive formats for specific GOOSs.
# # Most common use case is to archive as zip on Windows.
# # Default is empty.
# format_overrides:
# - goos: windows
# format: zip


# You may add the current tag source archive to the release as well.
# This is particularly useful if you want to sign it, for example.
# https://goreleaser.com/customization/source/
source:
# Whether this pipe is enabled or not.
# Defaults to `false`
enabled: false
# Name template of the final archive.
# Defaults to `{{ .ProjectName }}-{{ .Version }}`
name_template: '{{.ProjectName}}_{{.Tag}}'
# Format of the archive.
# Any format git-archive supports, this supports too.
# Defaults to `tar.gz`
format: 'zip'


# GoReleaser can create a GitHub/GitLab/Gitea release with the current tag, upload all the artifacts and generate the changelog based on the new commits since the previous tag.
# https://goreleaser.com/customization/release/
release:
# You can change the name of the release.
# Default is `{{.Tag}}`
# .XXX variables come from GoReleaser name templates, see https://goreleaser.com/customization/templates/
name_template: "{{.ProjectName}}-{{.Tag}}"


# https://goreleaser.com/customization/checksum/
checksum:
name_template: 'checksums.txt'


# https://goreleaser.com/customization/snapshots/
snapshot:
name_template: "{{.Tag}}-next"


# https://goreleaser.com/customization/release/#customize-the-changelog
changelog:
skip: true
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit 8eccfca

Please sign in to comment.