forked from bank-vaults/bank-vaults
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
40 lines (35 loc) · 1.29 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
dist: build/dist
# Requirements:
# - Docker
# - go install github.com/crazy-max/xgo@latest
builds:
# Building of Bank-Vaults is a bit hacky since the pkcs11 package can't be built with simple Go Crosscompiling
# so we need to use xgo, but that is not directly supported in GoReleaser, so we do the actual compilation with
# xgo in post hooks for all targets.
- main: ./cmd/template
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags: "-s -w -X main.version={{ .Version }} -X main.commitHash={{ .ShortCommit }} -X main.buildDate={{ .Date }}"
goos:
- linux
- darwin
goarch:
- amd64
- arm64
hooks:
post:
- xgo -targets {{ .Os }}/{{ .Arch }} -dest build/dist -ldflags '-s -w -X main.version={{ .Version }} -X main.commitHash={{ .ShortCommit }} -X main.buildDate={{ .Date }}' -pkg cmd/bank-vaults .
- sudo bash -c "mkdir -p build/dist/bank-vaults_{{ .Os }}_{{ .Arch }}; mv build/dist/github.com/bank-vaults/bank-vaults-{{ .Os }}-{{ .Arch }} build/dist/bank-vaults_{{ .Os }}_{{ .Arch }}/bank-vaults"
archives:
- name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "bank-vaults_checksums.txt"
changelog:
skip: false
release:
prerelease: auto