This repository has been archived by the owner on Oct 15, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
87 lines (80 loc) · 2.38 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
# .goreleaser.yml
project_name: rffmpeg-autoscaler
# Build
builds:
- env: [CGO_ENABLED=0]
goos:
- linux
- darwin
- freebsd
- windows
main: ./cmd/{{ .ProjectName }}
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X "main.Version=v{{ .Version }}"
- -X "main.GitCommit={{ .ShortCommit }}"
- -X "main.Timestamp={{ .Timestamp }}"
flags:
- -trimpath
ignore:
- goos: freebsd
goarch: arm64
- goos: windows
goarch: arm64
# MacOS Universal Binaries
universal_binaries:
- replace: true
# Archive
archives:
- name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format: "binary"
# Checksum
checksum:
name_template: "checksums.txt"
algorithm: sha512
# Changelog
changelog:
filters:
exclude:
- "^docs:"
- "^test:"
- "^Merge branch"
# Docker
dockers:
- image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"
use: buildx
dockerfile: ./apps/{{ .ProjectName }}/Dockerfile
build_flag_templates:
- --platform=linux/amd64
extra_files:
- apps
- image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"
use: buildx
goarch: arm64
dockerfile: ./apps/{{ .ProjectName }}/Dockerfile
build_flag_templates:
- --platform=linux/arm64
extra_files:
- apps
docker_manifests:
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Major }}"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ if .IsSnapshot }}{{ .Branch }}{{ else }}latest{{ end }}"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"