-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
77 lines (71 loc) · 1.94 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- 386
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
binary: '{{ .ProjectName }}'
ldflags: '{{ .Env.LD_FLAGS }}'
main: ./cmd/server
archives:
- format: tar.gz
rlcp: true
# this name template makes the OS and Arch compatible with the results of uname.
name_template: '{{ .ProjectName }}-{{ .Version }}.{{- tolower .Os }}-{{- if eq .Arch "amd64" }}x86_64{{- else if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}{{- if .Arm }}v{{ .Arm }}{{ end }}'
wrap_in_directory: true
files:
# OS specific scripts, not compiled
- src: docs/*
dst: docs/
strip_parent: true
- src: release/config.yml
strip_parent: true
- src: migrations/*.sql
dst: migrations/
strip_parent: true
checksum:
name_template: 'checksums.txt'
algorithm: sha256
snapshot:
name_template: "-snapshot"
nfpms:
- id: package
package_name: apiserver
file_name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}-{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
vendor: Your Company
maintainer: Developers
homepage: https://www.yoursite.com
formats:
- deb
- rpm
priority: extra
contents:
- src: config/local.yml
dst: /etc/apiserver/config.yaml
type: config
- src: migrations/*.sql
dst: /etc/apiserver/migrations/
- src: docs/*
dst: /etc/apiserver/docs/
- src: release/apiserver.service
dst: /etc/systemd/system/apiserver.service
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'