forked from capactio/capact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
116 lines (103 loc) · 3.05 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
# Release config.
# Diff to .goreleaser.latest.yml:
# - run before hook `make generate`
# - generate `386, amd64 and arm64` ARCH instead of amd64 only
# - upx compression set to 9 instead of 1
# - publish populator binary too
# - publish Docker images
before:
hooks:
- go mod tidy
builds:
# Capact CLI
- id: capact
env: &build-env
- CGO_ENABLED=0
goos: &build-goos
- linux
- windows
- darwin
goarch: &build-arch
- "386"
- amd64
- arm64
ignore: &build-ignore
# upx doesn't support packing Windows Arm64 binaries - see https://github.com/upx/upx/issues/551
# once there is more demand from the community to build such binary, we will create a separate build config for this combination
- goos: windows
goarch: arm64
hooks: &build-hooks
post: ./hack/compress-release-binary.sh {{ .Path }}
main: ./cmd/cli
binary: "capact"
ldflags:
- -s -w -X capact.io/capact/cmd/cli/cmd.Version={{.Version}} -X capact.io/capact/cmd/cli/cmd.Revision={{.ShortCommit}} -X capact.io/capact/cmd/cli/cmd.BuildDate={{.Date}} -X capact.io/capact/cmd/cli/cmd.Branch={{.Branch}}
# Capact populator
- id: populator
env: *build-env
goos: *build-goos
goarch: *build-arch
ignore: *build-ignore
hooks: *build-hooks
main: ./cmd/populator
binary: "populator"
archives:
- id: capact-archive
name_template: &archives-name-template "{{ .Binary }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
format: &archives-format binary
builds:
- capact
- id: populator-archive
name_template: *archives-name-template
format: *archives-format
builds:
- populator
brews:
- name: capact
ids:
- capact-archive
homepage: &homebrew-homepage https://github.com/capactio/homebrew-tap
description: "Capact CLI is a command-line tool, which manages Capact resources."
license: "Apache License 2.0"
tap: &homebrew-tap
owner: capactio
name: homebrew-tap
commit_author: &homebrew-commit-author
name: Capact Bot
email: [email protected]
test: |
system "#{bin}/capact version"
- name: populator
ids:
- populator-archive
homepage: *homebrew-homepage
description: "Populator is a command-line tool, which helps to populate various Capact content."
license: "Apache License 2.0"
tap: *homebrew-tap
commit_author: *homebrew-commit-author
test: |
system "#{bin}/populator help"
dockers:
- dockerfile: Dockerfile.cli
ids:
- capact
image_templates:
- "ghcr.io/capactio/tools/capact-cli:stable"
- "ghcr.io/capactio/tools/capact-cli:{{ .Tag }}"
- "ghcr.io/capactio/tools/capact-cli:v{{ .Major }}.{{ .Minor }}"
- "ghcr.io/capactio/tools/capact-cli:v{{ .Major }}"
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
dist: bin
release:
github:
owner: capactio
name: capact