-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.goreleaser.yaml
138 lines (127 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
133
134
135
136
137
138
version: 2
project_name: MediaWarp
snapshot:
version_template: "{{ incpatch .Version }}-PreRelease-{{ .ShortCommit }}"
release:
name_template: "{{ .Tag }}"
before:
hooks:
- go mod download
builds:
- env:
- GOPROXY=https://goproxy.io,direct
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm
- arm64
goarm:
- 5
- 6
- 7
ignore:
- goos: windows
goarm: 5
- goos: windows
goarm: 6
- goos: windows
goarm: 7
binary: "{{ .ProjectName }}"
ldflags:
- -s -w
- -X MediaWarp/internal/config.appVersion={{ .Version }}
- -X MediaWarp/internal/config.commitHash={{ .FullCommit }}
- -X MediaWarp/internal/config.buildDate={{ .Date}}
dockers:
- dockerfile: docker/Dockerfile-goreleaser
use: buildx
skip_push: false
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
goos: linux
goarch: amd64
goamd64: v1
image_templates:
- "akimio/mediawarp:{{ .Version }}-amd64"
- dockerfile: docker/Dockerfile-goreleaser
use: buildx
skip_push: false
build_flag_templates:
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
goos: linux
goarch: arm64
image_templates:
- "akimio/mediawarp:{{ .Version }}-arm64"
- dockerfile: docker/Dockerfile-goreleaser
use: buildx
skip_push: false
build_flag_templates:
- "--platform=linux/arm/v6"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
goos: linux
goarch: arm
goarm: "6"
image_templates:
- "akimio/mediawarp:{{ .Version }}-armv6"
- dockerfile: docker/Dockerfile-goreleaser
use: buildx
skip_push: false
build_flag_templates:
- "--platform=linux/arm/v7"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
goos: linux
goarch: arm
goarm: "7"
image_templates:
- "akimio/mediawarp:{{ .Version }}-armv7"
docker_manifests:
- name_template: "akimio/mediawarp:latest"
image_templates:
- "akimio/mediawarp:{{ .Version }}-amd64"
- "akimio/mediawarp:{{ .Version }}-arm64"
- "akimio/mediawarp:{{ .Version }}-armv6"
- "akimio/mediawarp:{{ .Version }}-armv7"
- name_template: "akimio/mediawarp:{{ .Version }}"
image_templates:
- "akimio/mediawarp:{{ .Version }}-amd64"
- "akimio/mediawarp:{{ .Version }}-arm64"
- "akimio/mediawarp:{{ .Version }}-armv6"
- "akimio/mediawarp:{{ .Version }}-armv7"
archives:
- format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{- .Os }}_{{ .Arch }}{{- if .Arm}}v{{ .Arm }}{{- end}}"
# 对于 Windows 存档使用 zip 格式
format_overrides:
- goos: windows
format: zip
files:
- src: LICENSE
- src: README.md
- src: config/config.yaml.example
dst: config.yaml.example
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^build:"
- "^release:"