-
Notifications
You must be signed in to change notification settings - Fork 108
/
.goreleaser.yaml
132 lines (119 loc) · 3.86 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
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
# Make sure to check the documentation at https://goreleaser.com
## Test locally with `make release-dry-run`
## TODO
# - Add SBOMs
# - Add Docker Builds
# - SLSA - https://github.com/goreleaser/goreleaser-example-slsa-provenance
env:
- CGO_ENABLED=1
- CC_darwin_arm64=oa64-clang
- CXX_darwin_arm64=oa64-clang++
- CC_darwin_amd64=o64-clang
- CXX_darwin_amd64=o64-clang+
- CC_linux_arm64=aarch64-linux-gnu-gcc
- CXX_linux_arm64=aarch64-linux-gnu-g++
- CC_linux_amd64=x86_64-linux-gnu-gcc
- CXX_linux_amd64=x86_64-linux-gnu-g++
- CC_windows_amd64=x86_64-w64-mingw32-gcc
- CXX_windows_amd64=x86_64-w64-mingw32-g++
- VERSION={{ .Version }}
- BUILDTIME={{ .Date }}
# - CC_windows_arm64= NOT_CREATING_WINDOWS_ARM64_BINARIES
# - CXX_windows_arm64= NOT_CREATING_WINDOWS_ARM64_BINARIES
before:
hooks:
- go mod download
- go mod tidy
builds:
- id: "zetacored"
main: ./cmd/zetacored
binary: "zetacored-{{ .Os }}-{{ .Arch }}"
env:
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
goos:
- linux
- darwin
- windows
goarch:
- arm64
- amd64
ignore:
- goos: windows
goarch: arm64
flags: &default_flags
- -tags=pebbledb,ledger
ldflags: &default_ldflags
- -X github.com/cosmos/cosmos-sdk/version.Name=zetacore
- -X github.com/cosmos/cosmos-sdk/version.ServerName=zetacored
- -X github.com/cosmos/cosmos-sdk/version.ClientName=zetaclientd
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .FullCommit }}
- -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb
- -X github.com/zeta-chain/node/pkg/constant.Name=zetacored
- -X github.com/zeta-chain/node/pkg/constant.Version={{ .Version }}
- -X github.com/zeta-chain/node/pkg/constant.CommitHash={{ .FullCommit }}
- -X github.com/zeta-chain/node/pkg/constant.BuildTime={{ .CommitDate }}
- -X main.version={{ .Version }}
- -X main.commit={{ .Commit }}
- -X main.date={{ .CommitDate }}
- -buildid=
- -s -w
- id: "zetaclientd"
main: ./cmd/zetaclientd
binary: "zetaclientd-{{ .Os }}-{{ .Arch }}"
env:
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
goos:
- linux
# - darwin
# - windows
goarch:
- arm64
- amd64
ignore:
- goos: windows
goarch: arm64
flags: *default_flags
ldflags: *default_ldflags
archives:
- format: binary
name_template: "{{ .Binary }}"
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
snapshot:
name_template: "{{ .Tag }}-next"
release:
# If set to true, will not auto-publish the release.
# Available only for GitHub and Gitea.
draft: false
target_commitish: "{{ .FullCommit }}"
# If set, will create a release discussion in the category specified.
#
# Warning: do not use categories in the 'Announcement' format.
# Check https://github.com/goreleaser/goreleaser/issues/2304 for more info.
#
# Default is empty.
# discussion_category_name: General
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
# Default is false.
prerelease: auto
# What to do with the release notes in case there the release already exists.
#
# Valid options are:
# - `keep-existing`: keep the existing notes
# - `append`: append the current release notes to the existing notes
# - `prepend`: prepend the current release notes to the existing notes
# - `replace`: replace existing notes
#
# Default is `keep-existing`.
mode: append