-
Notifications
You must be signed in to change notification settings - Fork 99
/
.goreleaser-cross.yaml
194 lines (192 loc) · 6.81 KB
/
.goreleaser-cross.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
---
before:
hooks:
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.LIBWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/local/lib/libwasmvm_muslc.a
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.LIBWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a
- apt update && apt install musl-dev=1.2.2-1
env:
- CGO_ENABLED=1
git:
# What should be used to sort tags when gathering the current and previous
# tags if there are more than one tag in the same commit.
#
# Default: '-version:refname'
# Source: https://goreleaser.com/customization/git/
tag_sort: -version:creatordate
builds:
- id: archwayd-linux-arm64
main: ./cmd/archwayd
binary: archwayd
goos:
- linux
goarch:
- arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
ldflags:
- -s -w
- -X main.commit={{.Commit}}
- -X main.date={{ .CommitDate }}
- -X github.com/cosmos/cosmos-sdk/version.Name=archway
- -X github.com/cosmos/cosmos-sdk/version.AppName=archway
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -linkmode=external
- -extldflags '-Wl,-z,muldefs --static -lm'
tags:
- netgo
- muslc
- id: archwayd-darwin-amd64
main: ./cmd/archwayd
binary: archwayd
env:
- CC=o64-clang
- CGO_LDFLAGS=-L/lib
goos:
- darwin
goarch:
- amd64
flags:
- -mod=readonly
- -trimpath
ldflags:
- -X main.commit={{ .Commit }}
- -X main.date={{ .CommitDate }}
- -X github.com/cosmos/cosmos-sdk/version.Name=archway
- -X github.com/cosmos/cosmos-sdk/version.AppName=archway
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm
- -w -s
- -linkmode=external
tags:
- netgo
- ledger
- static_wasm
- id: archwayd-darwin-arm64
main: ./cmd/archwayd
binary: archwayd
env:
- CC=oa64-clang
- CGO_LDFLAGS=-L/lib
goos:
- darwin
goarch:
- arm64
flags:
- -mod=readonly
- -trimpath
ldflags:
- -X main.commit={{ .Commit }}
- -X main.date={{ .CommitDate }}
- -X github.com/cosmos/cosmos-sdk/version.Name=archway
- -X github.com/cosmos/cosmos-sdk/version.AppName=archway
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm
- -w -s
- -linkmode=external
tags:
- netgo
- ledger
- static_wasm
universal_binaries:
- id: archwayd-darwin-all
ids:
- archwayd-darwin-amd64
- archwayd-darwin-arm64
replace: false
name_template: "{{ .ProjectName }}d"
release:
skip_upload: '{{ if eq .Env.RELEASE "true" }}false{{else}}true{{end}}'
archives:
- id: w/version
builds:
- archwayd-linux-arm64
- archwayd-darwin-amd64
- archwayd-darwin-arm64
- archwayd-darwin-all
name_template: "{{ .ProjectName }}d_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: false
format: zip
files:
- none*
- id: wo/version
builds:
- archwayd-linux-arm64
- archwayd-darwin-amd64
- archwayd-darwin-arm64
- archwayd-darwin-all
name_template: "{{ .ProjectName }}d_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: false
format: zip
files:
- none*
- id: binary
builds:
- archwayd-linux-arm64
- archwayd-darwin-amd64
- archwayd-darwin-arm64
- archwayd-darwin-all
name_template: "{{ .ProjectName }}d_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: false
format: binary
files:
- none*
checksum:
name_template: "{{ .ProjectName }}d_v{{ .Version }}_cross_checksums.txt"
dockers:
- use: buildx
goos: linux
goarch: arm64
image_templates:
- 'ghcr.io/archway-network/{{ .ProjectName }}d:{{if eq .Env.RELEASE "true"}}v{{ .Version }}-arm64v8{{else}}{{ .ShortCommit }}-arm64v8{{end}}'
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}d"
- "--label=org.opencontainers.image.description={{.ProjectName}}d"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version=v{{.Version}}"
- "--label=org.opencontainers.image.url=https://archway.io"
- "--label=org.opencontainers.image.source=https://github.com/archway-network/archway"
- "--label=org.opencontainers.image.licenses=Apache-2.0"
- use: buildx
goos: linux
goarch: arm64
dockerfile: Dockerfile.dev
image_templates:
- 'ghcr.io/archway-network/{{ .ProjectName }}d-dev:{{if eq .Env.RELEASE "true"}}v{{ .Version }}{{else}}{{ .ShortCommit }}{{end}}-arm64v8'
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}d"
- "--label=org.opencontainers.image.description={{.ProjectName}}d"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version=v{{.Version}}"
- "--label=org.opencontainers.image.url=https://archway.io"
- "--label=org.opencontainers.image.source=https://github.com/archway-network/archway"
- "--label=org.opencontainers.image.licenses=Apache-2.0"
docker_manifests:
- name_template: 'ghcr.io/archway-network/{{ .ProjectName }}d:{{if eq .Env.RELEASE "true" }}v{{ .Version }}{{else}}{{ .ShortCommit }}{{end}}'
create_flags:
- --insecure
push_flags:
- --insecure
image_templates:
- 'ghcr.io/archway-network/{{ .ProjectName }}d:{{if eq .Env.RELEASE "true"}}v{{ .Version }}-amd64{{else}}{{ .ShortCommit }}-amd64{{end}}'
- 'ghcr.io/archway-network/{{ .ProjectName }}d:{{if eq .Env.RELEASE "true"}}v{{ .Version }}-arm64v8{{else}}{{ .ShortCommit }}-arm64v8{{end}}'
- name_template: 'ghcr.io/archway-network/{{ .ProjectName }}d-dev:{{if eq .Env.RELEASE "true" }}v{{ .Version }}{{else}}{{ .ShortCommit }}{{end}}'
create_flags:
- --insecure
push_flags:
- --insecure
image_templates:
- 'ghcr.io/archway-network/{{ .ProjectName }}d-dev:{{if eq .Env.RELEASE "true"}}v{{ .Version }}{{else}}{{ .ShortCommit }}{{end}}-amd64'
- 'ghcr.io/archway-network/{{ .ProjectName }}d-dev:{{if eq .Env.RELEASE "true"}}v{{ .Version }}{{else}}{{ .ShortCommit }}{{end}}-arm64v8'