forked from openimsdk/chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
495 lines (440 loc) · 17.2 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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
- make clean
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
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'
tag_sort: -version:creatordate
# What should be used to specify prerelease suffix while sorting tags when gathering
# the current and previous tags if there are more than one tag in the same commit.
#
# Since: v1.17
prerelease_suffix: "-"
# Tags to be ignored by GoReleaser.
# This means that GoReleaser will not pick up tags that match any of the
# provided values as either previous or current tags.
#
# Templates: allowed.
# Since: v1.21.
ignore_tags:
- nightly
# - "{{.Env.IGNORE_TAG}}"
report_sizes: true
builds:
- binary: chat-api
id: chat-api
main: ./cmd/api/chat-api/main.go
goos:
- darwin
- linux
- windows
goarch:
- amd64
- s390x
- arm64
- ppc64le
goarm:
- "6"
- "7"
ignore:
- goos: darwin
goarch: s390x
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: s390x
- goos: windows
goarch: arm64
- goos: windows
goarch: ppc64le
- binary: admin-api
id: admin-api
main: ./cmd/api/admin-api/main.go
goos:
- darwin
- linux
- windows
goarch:
- amd64
- s390x
- arm64
- ppc64le
goarm:
- "6"
- "7"
ignore:
- goos: darwin
goarch: s390x
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: s390x
- goos: windows
goarch: arm64
- goos: windows
goarch: ppc64le
- binary: chat-rpc
id: chat-rpc
main: ./cmd/rpc/chat-rpc/main.go
goos:
- darwin
- linux
- windows
goarch:
- amd64
- s390x
- arm64
- ppc64le
goarm:
- "6"
- "7"
ignore:
- goos: darwin
goarch: s390x
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: s390x
- goos: windows
goarch: arm64
- goos: windows
goarch: ppc64le
- binary: admin-rpc
id: admin-rpc
main: ./cmd/rpc/admin-rpc/main.go
goos:
- darwin
- linux
- windows
goarch:
- amd64
- s390x
- arm64
- ppc64le
goarm:
- "6"
- "7"
ignore:
- goos: darwin
goarch: s390x
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: s390x
- goos: windows
goarch: arm64
- goos: windows
goarch: ppc64le
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
files:
- LICENSE
- README.md
- docs/*
# a more complete example, check the globbing deep dive below
- src: "*.md"
dst: docs
# Strip parent folders when adding files to the archive.
strip_parent: true
# File info.
# Not all fields are supported by all formats available formats.
#
# Default: copied from the source file
info:
# Templates: allowed (since v1.14)
owner: root
# Templates: allowed (since v1.14)
group: root
# Must be in time.RFC3339Nano format.
#
# Templates: allowed (since v1.14)
mtime: "{{ .CommitDate }}"
# File mode.
mode: 0644
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
use: github
filters:
exclude:
- "^test:"
- "^chore"
- "merge conflict"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: Dependency updates
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
order: 300
- title: "New Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: "Security updates"
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 150
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
- title: "Documentation updates"
regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
order: 400
- title: "Build process updates"
regexp: ^.*?build(\([[:word:]]+\))??!?:.+$
order: 400
- title: Other work
order: 9999
# dockers:
# - image_templates:
# - "openim/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
# build_flag_templates:
# - "--pull"
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
# - "--label=io.artifacthub.package.license=Apace-2.0"
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--label=org.opencontainers.image.source={{.GitURL}}"
# - "--platform=linux/amd64"
# goos: linux
# goarch: amd64
# dockerfile: ./build/images/api-chat/Dockerfile
# use: buildx
# - image_templates:
# - "openim/openim-chat-api-chat:{{ .Tag }}-arm64"
# - "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
# build_flag_templates:
# - "--pull"
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
# - "--label=io.artifacthub.package.license=Apace-2.0"
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--label=org.opencontainers.image.source={{.GitURL}}"
# - "--platform=linux/arm64"
# goos: linux
# goarch: arm64
# dockerfile: ./build/images/api-chat/Dockerfile
# use: buildx
# - image_templates:
# - "openim/openim-chat-api-admin:{{ .Tag }}-amd64"
# - "ghcr.io/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
# build_flag_templates:
# - "--pull"
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
# - "--label=io.artifacthub.package.license=Apace-2.0"
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--label=org.opencontainers.image.source={{.GitURL}}"
# - "--platform=linux/amd64"
# goos: linux
# goarch: amd64
# dockerfile: ./build/images/api-admin/Dockerfile
# use: buildx
# - image_templates:
# - "openim/openim-chat-api-admin:{{ .Tag }}-arm64"
# - "ghcr.io/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
# build_flag_templates:
# - "--pull"
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
# - "--label=io.artifacthub.package.license=Apace-2.0"
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--label=org.opencontainers.image.source={{.GitURL}}"
# - "--platform=linux/arm64"
# goos: linux
# goarch: arm64
# dockerfile: ./build/images/api-admin/Dockerfile
# use: buildx
# docker_manifests:
# - name_template: "openim/openim-chat-api-admin:{{ .Tag }}"
# image_templates:
# - "openim/openim-chat-api-admin:{{ .Tag }}-amd64"
# - "openim/openim-chat-api-admin:{{ .Tag }}-arm64"
# - name_template: "ghcr.io/openimsdk/openim-chat:{{ .Tag }}"
# image_templates:
# - "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-amd64"
# - "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-arm64"
# - name_template: "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}"
# image_templates:
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
# - name_template: "openim/openim-chat-api-admin:latest"
# image_templates:
# - "openim/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "openim/openim-chat-api-chat:{{ .Tag }}-arm64"
# - name_template: "ghcr.io/openimsdk/openim-chat-api-chat:latest"
# image_templates:
# - "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
# - name_template: "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:latest"
# image_templates:
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
nfpms:
- id: packages
builds:
- admin-api
- chat-api
- chat-rpc
- admin-rpc
# Your app's vendor.
vendor: OpenIMSDK
homepage: https://github.com/OpenIMSDK/chat
maintainer: kubbot <https://github.com/kubbot>
description: |-
Auto sync github labels
kubbot && openimbot
license: MIT
formats:
- apk
- deb
- rpm
- termux.deb # Since: v1.11
- archlinux # Since: v1.13
dependencies:
- git
recommends:
- golang
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
# Default: './dist'
dist: ./_output/dist
# # .goreleaser.yaml
# milestones:
# # You can have multiple milestone configs
# -
# # Repository for the milestone
# # Default is extracted from the origin remote URL
# repo:
# owner: OpenIMSDK
# name: chat
# # Whether to close the milestone
# close: true
# # Fail release on errors, such as missing milestone.
# fail_on_error: false
# # Name of the milestone
# #
# Default: '{{ .Tag }}'
# name_template: "Current Release"
publishers:
- name: "fury.io"
ids:
- packages
dir: "{{ dir .ArtifactPath }}"
cmd: |
bash -c '
if [[ "{{ .Tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/openim/
else
echo "Skipping deployment: Non-production release detected"
fi'
# snapcrafts:
# - name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
# summary: openim is open source instant messaging
# description: |
# OpenIM yyds
# grade: stable
# confinement: classic
# publish: true
checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
algorithm: sha256
snapshot:
name_template: "{{ .Tag }}-next"
release:
prerelease: auto
footer: |
## Welcome to the {{ .Tag }} release of [chat](https://github.com/OpenIMSDK/chat)!🎉🎉!
**Full Changelog**: https://github.com/OpenIMSDK/chat/compare/{{ .PreviousTag }}...{{ .Tag }}
## Helping out
+ We release logs are recorded on [✨ CHANGELOG](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CHANGELOG/CHANGELOG.md)
+ For information on versions of OpenIM and how to maintain branches, read [📚this article](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
+ If you wish to use mirroring, read OpenIM's [image management policy](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md)
**Want to be one of them 😘?**
<p align="center">
<a href="https://github.com/kubbot" style="float: left; margin-right: 10px;">
<img src="https://github.com/openimbot/openimbot/blob/main/assets/icon/blue%E9%80%8F%E6%98%8E.png" width="50" height="50" />
</a>
<a href="https://www.openim.online">
<img src="https://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo.png" />
</a>
<a href="https://github.com/openimbot" style="float: right; margin-left: 10px;">
<img src="https://github.com/openimbot/openimbot/blob/main/assets/icon/red%E9%80%8F%E6%98%8E.png" width="50" height="50" />
</a>
</p>
> **Note**
> @openimbot and @kubbot have made great contributions to the community as community 🤖robots(@openimsdk/bot), respectively.
> Thanks to the @openimsdk/openim team for all their hard work on this release.
> Thank you to all the [💕developers and contributors](https://github.com/OpenIMSDK/chat/graphs/contributors), people from all over the world, OpenIM brings us together
> Contributions to this project are welcome! Please see [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md) for details.
## Get Involved with OpenIM!
**Here are some ways to get involved with the OpenIM community:**
📢 **Slack Channel**: Join our Slack channels for discussions, communication, and support. Click [here](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to join the chat Slack team channel.
📧 **Gmail Contact**: If you have any questions, suggestions, or feedback for our open-source projects, please feel free to [contact us via email](https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]).
📖 **Blog**: Stay up-to-date with OpenIM-Server projects and trends by reading our [blog](https://doc.rentsoft.cn/). We share the latest developments, tech trends, and other interesting information related to OpenIM.
📱 **WeChat**: Add us on WeChat (QR Code) and indicate that you are a user or developer of chat. We'll process your request as soon as possible.
Remember, your contributions play a vital role in making OpenIM successful, and we look forward to your active participation in our community! 🙌
# webhook
# announce:
# slack:
# enabled: false
# message_template: "slack {{ .Tag }} is out! Check it out: https://github.com/OpenIMSDK/Open-IM-Server/releases/tag/{{ .Tag }}"