Skip to content

Commit

Permalink
build: add goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
dulli committed Jul 10, 2022
1 parent c509dda commit 708f07f
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,5 @@ $RECYCLE.BIN/
bin/
data/
*.syso
*.gen.go
*.gen.go
dist/
66 changes: 66 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
- go mod tidy
- go generate ./...
archives:
- format_overrides:
- goos: windows
format: zip
files:
- config/*
- web/*
- data/**.tengo
- scripts/*
builds:
- binary: bbycrgo-rest
env:
- CGO_ENABLED=1
targets:
- windows_amd64
- linux_amd64
- linux_arm64
main: ./cmd/bbycr-rest
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -v
- -trimpath
overrides:
- goos: windows
goarch: amd64
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-g++
- goos: linux
goarch: arm64
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
checksum:
name_template: 'checksums.txt'
signs:
- artifacts: checksum
args:
[
'-u',
'679BC66B1C3B601E',
'--output',
'${signature}',
'--detach-sign',
'${artifact}',
]
snapshot:
name_template: '{{ incpatch .Version }}-next'
changelog:
sort: asc
filters:
exclude: # See commit-msg hook
- '^chore:'
- '^docs:'
- '^refactor:'
- '^style:'
- '^ci:'
- '^build:'
- '^test:'

0 comments on commit 708f07f

Please sign in to comment.