Skip to content

Instantly share code, notes, and snippets.

@okamos
Created October 30, 2019 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okamos/3e841d57165ceddad54dd1e4a80daa3d to your computer and use it in GitHub Desktop.
Save okamos/3e841d57165ceddad54dd1e4a80daa3d to your computer and use it in GitHub Desktop.
Multiple build using GoReleaser
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# you may remove this if you don't need go generate
- go generate ./...
builds:
-
id: scene-build
main: ./bin/scene/main.go
binary: scene
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
flags:
- -v
ldflags:
- -s -w -X main.build={{.Version}}
-
id: trunk-build
main: ./bin/trunk/main.go
binary: trunk
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
flags:
- -v
ldflags:
- -s -w -X main.build={{.Version}}
archives:
-
id: scene-archive
builds:
- scene-build
name_template: "{{ .Binary }}"
replacements:
linux: Linux
format: binary
-
id: trunk-archive
builds:
- trunk-build
name_template: "{{ .Binary }}"
replacements:
amd64: 64-bit
linux: Linux
format: binary
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment