generated from bartoszmajsak/template-golang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds goreleaser and release job
- Loading branch information
1 parent
1dc8992
commit bf5436c
Showing
2 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
before: | ||
hooks: | ||
- make deps | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
## Overlaps with what is defined in Makefile - we should find a away of having it defined only once | ||
- PACKAGE_NAME=github.com/bartoszmajsak/github-changelog-generator | ||
- RELEASE=true | ||
main: ./cmd/ | ||
binary: ghc | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- 386 | ||
- amd64 | ||
ldflags: | ||
- -s -w -X {{.Env.PACKAGE_NAME}}/version.Release={{.Env.RELEASE}} -X {{.Env.PACKAGE_NAME}}/version.Version=v{{.Version}} -X {{.Env.PACKAGE_NAME}}/version.Commit={{.ShortCommit}} -X {{.Env.PACKAGE_NAME}}/version.BuildTime={{.Date}} | ||
archives: | ||
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" |