-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
87 lines (87 loc) · 3.07 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
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
env:
- GO111MODULE=on
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- go generate ./...
project_name: notification-worker
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
# - 386
- amd64
# - arm
- arm64
ldflags:
- -X github.com/hitokoto-osc/notification-worker/config.Version={{.Version}} -X github.com/hitokoto-osc/notification-worker/config.BuildTag={{.FullCommit}} -X github.com/hitokoto-osc/notification-worker/config.BuildTime={{ .Date }} -X github.com/hitokoto-osc/notification-worker/config.CommitTime={{ .CommitDate }}
archives:
- 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 -}}
format_overrides:
- goos: windows
format: zip
files:
- README.md
- config.example.yml
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
groups:
- title: "✨ Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "🐛 Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: "📦 Code Refactoring"
regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$'
order: 2
- title: "🚀 Performance Improvements"
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
order: 3
- title: "♻️ Others"
order: 999
dockers:
- goos: linux
# GOARCH of the built binaries/packages that should be used.
goarch: amd64
# GOARM of the built binaries/packages that should be used.
goarm: ''
image_templates:
- "hitokoto/notification-worker:latest"
- "hitokoto/notification-worker:{{ .Tag }}"
- "hitokoto/notification-worker:v{{ .Major }}"
dockerfile: ./manifest/docker/Dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/hitokoto-osc/notification_worker/master/README.md"
- "--label=io.artifacthub.package.logo-url=https://cdn.a632079.me/assets/images/hitokoto-logo-512x512.png"
- '--label=io.artifacthub.package.maintainers=[{"name":"a632079","email":"[email protected]"}]'
- "--label=io.artifacthub.package.license=MIT"
- "--label=org.opencontainers.image.description=基于 RabbitMQ 的消费者事件模型,目前仅实现了通知事件"
- "--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"
extra_files:
- config.example.yml