-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
141 lines (133 loc) · 4.15 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
project_name: service
archives:
- id: service
builds:
- client
- server
files:
- LICENSE
format: tar.gz
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
brews:
- name: service
caveats: An example of the goreleaser usage.
commit_author:
name: Kamil Samigullin
email: [email protected]
description: Template for a typical service written on Go.
folder: Formula
homepage: https://go-service.octolab.org/
repository:
owner: octolab
name: homebrew-tap
install: |
bin.install "service"
output = Utils.popen_read("#{bin}/server completion bash")
(bash_completion/"server").write output
output = Utils.popen_read("#{bin}/server completion fish")
(fish_completion/"server.fish").write output
output = Utils.popen_read("#{bin}/server completion zsh")
(zsh_completion/"_server").write output
bin.install "client"
output = Utils.popen_read("#{bin}/client completion bash")
(bash_completion/"client").write output
output = Utils.popen_read("#{bin}/client completion fish")
(fish_completion/"client.fish").write output
output = Utils.popen_read("#{bin}/client completion zsh")
(zsh_completion/"_client").write output
prefix.install_metafiles
test: |
system "#{bin}/server version"
system "#{bin}/client version"
builds:
- id: client
binary: client
env:
- CGO_ENABLED=0
flags:
- -trimpath
goarch:
- amd64
- arm64
goos:
- darwin
- linux
ldflags:
- -s -w -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.version={{.Version}}
main: ./cmd/client
- id: server
binary: server
env:
- CGO_ENABLED=0
flags:
- -trimpath
goarch:
- amd64
- arm64
goos:
- darwin
- linux
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
main: ./cmd/server
checksum: { name_template: checksums.txt }
dockers:
- id: server-linux-amd64
goos: linux
goarch: amd64
ids:
- server
image_templates:
- 'ghcr.io/octomation/go-service:{{.Tag}}-amd64'
- 'ghcr.io/octomation/go-service:v{{.Major}}-amd64'
- 'ghcr.io/octomation/go-service:v{{.Major}}.{{.Minor}}-amd64'
use: buildx
build_flag_templates:
- '--pull'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--platform=linux/amd64'
extra_files:
- deploy/config.toml
- LICENSE
- id: server-linux-arm64
goos: linux
goarch: arm64
ids:
- server
image_templates:
- 'ghcr.io/octomation/go-service:{{.Tag}}-arm64'
- 'ghcr.io/octomation/go-service:v{{.Major}}-arm64'
- 'ghcr.io/octomation/go-service:v{{.Major}}.{{.Minor}}-arm64'
use: buildx
build_flag_templates:
- '--pull'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--platform=linux/arm64'
extra_files:
- deploy/config.toml
- LICENSE
docker_manifests:
- name_template: 'ghcr.io/octomation/go-service:latest'
image_templates:
- 'ghcr.io/octomation/go-service:{{.Tag}}-amd64'
- 'ghcr.io/octomation/go-service:{{.Tag}}-arm64'
- name_template: 'ghcr.io/octomation/go-service:{{.Tag}}'
image_templates:
- 'ghcr.io/octomation/go-service:{{.Tag}}-amd64'
- 'ghcr.io/octomation/go-service:{{.Tag}}-arm64'
- name_template: 'ghcr.io/octomation/go-service:v{{.Major}}'
image_templates:
- 'ghcr.io/octomation/go-service:v{{.Major}}-amd64'
- 'ghcr.io/octomation/go-service:v{{.Major}}-arm64'
- name_template: 'ghcr.io/octomation/go-service:v{{.Major}}.{{.Minor}}'
image_templates:
- 'ghcr.io/octomation/go-service:v{{.Major}}.{{.Minor}}-amd64'
- 'ghcr.io/octomation/go-service:v{{.Major}}.{{.Minor}}-arm64'
release:
github:
owner: octomation
name: go-service