-
Notifications
You must be signed in to change notification settings - Fork 32
/
.goreleaser.yml
126 lines (119 loc) · 4.26 KB
/
.goreleaser.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
project_name: rfq
monorepo:
tag_prefix: services/rfq/
dir: services/rfq/
builds:
# Linux AMD64
- id: api
binary: api
gcflags:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# required workaround for https://github.com/Shopify/sarama/issues/2206
# See: https://github.com/golang/go/issues/35067#issuecomment-544805311 because we're statically compiling,
# without forcing netgo, we use the cgo resolver which will not work for .local (a canonical tld in kubernetes)
# the other way to resolve this would be to modify the nsswitch.conf in the container, but that's a bit less clean.
# osusergo was included as a recommendation here: https://github.com/kubernetes/kubernetes/pull/114225#issuecomment-1348920040
tags:
- netgo
- osusergo
env:
- CC=gcc
- CXX=g++
main: api/main.go
goos:
- linux
goarch:
- amd64
# Linux AMD64
- id: relayer
binary: relayer
gcflags:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# see above about workaround
tags:
- netgo
- osusergo
env:
- CC=gcc
- CXX=g++
main: relayer/main.go
goos:
- linux
goarch:
- amd64
- id: rfqdecoder
binary: rfqdecoder
gcflags:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# see above about workaround
tags:
- netgo
- osusergo
env:
- CC=gcc
- CXX=g++
main: tools/rfqdecoder/main.go
goos:
- linux
goarch:
- amd64
# add a source archive at release time
source:
enabled: true
# Archives
archives:
- format: tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
name_template: '{{.ProjectName}}-{{.Version}}_{{.Os}}_{{.Arch}}'
files:
- README.md
checksum:
name_template: checksums.txt
# Add a changelog
changelog:
sort: asc
dockers:
# Docker AMD64
- goos: linux
goarch: amd64
image_templates:
- 'ghcr.io/synapsecns/sanguine/rfq-relayer:latest'
- 'ghcr.io/synapsecns/sanguine/rfq-relayer:{{ .FullCommit }}'
- 'ghcr.io/synapsecns/sanguine/rfq-relayer:{{ .Tag }}'
build_flag_templates:
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.name={{.ProjectName}}'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--label=org.opencontainers.image.source={{.GitURL}}'
dockerfile: ../../docker/rfq-relayer.Dockerfile
ids:
- relayer
# Docker AMD64
- goos: linux
goarch: amd64
image_templates:
- 'ghcr.io/synapsecns/sanguine/rfq-api:latest'
- 'ghcr.io/synapsecns/sanguine/rfq-api:{{ .FullCommit }}'
- 'ghcr.io/synapsecns/sanguine/rfq-api:{{ .Tag }}'
build_flag_templates:
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.name={{.ProjectName}}'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--label=org.opencontainers.image.source={{.GitURL}}'
dockerfile: ../../docker/rfq-api.Dockerfile
ids:
- api