-
Notifications
You must be signed in to change notification settings - Fork 20
/
.goreleaser.yaml
98 lines (94 loc) · 3.73 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
before:
hooks:
- go mod tidy
env:
- CGO_ENABLED=1
builds:
- id: arkeod-linux-amd64
binary: arkeod
main: ./cmd/arkeod
goos:
- linux
goarch:
- amd64
flags:
- -mod=readonly
- -trimpath
ldflags:
- -s -w
- -X main.commit={{.Commit}}
- -X main.date={{ .CommitDate }}
- -X github.com/cosmos/cosmos-sdk/version.Name=Arkeo
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.AppName=arkeo
- -X github.com/cosmos/cosmos-sdk/version.BuildTags={{ .Env.BUILD_TAG }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/arkeonetwork/arkeo/x/arkeo/configs.Version=v{{ .Version }}
- -X github.com/arkeonetwork/arkeo/x/arkeo/configs.GitCommit={{ .Commit }}
- -linkmode=external
- -extldflags '-Wl,-z,muldefs --static -lm'
tags:
- '{{ .Env.BUILD_TAG }}'
release:
skip_upload: '{{ if eq .Env.RELEASE "true" }}false{{else}}true{{end}}'
archives:
- id: w/version
builds:
- arkeod-linux-amd64
name_template: '{{ .ProjectName }}d_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if eq .Env.BUILD_TAG "testnet" }}-testnet{{ end }}'
wrap_in_directory: false
format: zip
files:
- none*
- id: wo/version
builds:
- arkeod-linux-amd64
name_template: '{{ .ProjectName }}d_{{ .Os }}_{{ .Arch }}{{ if eq .Env.BUILD_TAG "testnet" }}-testnet{{ end }}'
wrap_in_directory: false
format: zip
files:
- none*
- id: binary
builds:
- arkeod-linux-amd64
name_template: '{{ .ProjectName }}d_{{ .Os }}_{{ .Arch }}{{ if eq .Env.BUILD_TAG "testnet" }}-testnet{{ end }}'
wrap_in_directory: false
format: binary
files:
- none*
checksum:
name_template: '{{ .ProjectName }}d_v{{ .Version }}_{{ if eq .Env.BUILD_TAG "testnet" }}testnet{{ end }}_checksums.txt'
dockers:
- use: buildx
goos: linux
goarch: amd64
image_templates:
- 'ghcr.io/arkeonetwork/{{ .ProjectName }}:{{ if eq .Env.BUILD_TAG "testnet" }}testnet-{{.ShortCommit}}{{ else }}{{ if eq .Env.RELEASE "true" }}v{{ .Version }}-amd64{{ else }}{{ .ShortCommit }}-amd64{{ end }}{{ end }}'
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--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://arkeo.network/"
- "--label=org.opencontainers.image.source=https://github.com/arkeonetwork/arkeo"
- "--label=org.opencontainers.image.licenses=Apache-2.0"
- use: buildx
goos: linux
goarch: amd64
dockerfile: Dockerfile.dev
image_templates:
- 'ghcr.io/arkeonetwork/{{ .ProjectName }}-dev:{{ if eq .Env.BUILD_TAG "testnet" }}testnet-{{.ShortCommit}}{{ else }}{{ if eq .Env.RELEASE "true" }}v{{ .Version }}{{ else }}{{ .ShortCommit }}{{ end }}-amd64{{ end }}'
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--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://arkeo.network/"
- "--label=org.opencontainers.image.source=https://github.com/arkeonetwork/arkeo"
- "--label=org.opencontainers.image.licenses=Apache-2.0"