-
Notifications
You must be signed in to change notification settings - Fork 2
/
.goreleaser.yaml
83 lines (80 loc) · 2.82 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
project_name: gigafeed
release:
replace_existing_draft: true
header: |
Welcome to this new release!
footer: |
Docker Images:
`docker.io/divideprojects/{{ .ProjectName }}:latest`
`ghcr.io/gigauserbot/{{ .ProjectName }}:latest`
before:
hooks:
- go mod tidy
- go mod download
builds:
- goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
archives:
- format: binary
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
dockers:
# amd64 only
- goarch: amd64
dockerfile: goreleaser.Dockerfile
use: buildx
image_templates:
- "docker.io/divideprojects/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "ghcr.io/gigauserbot/{{ .ProjectName }}:{{ .Tag }}-amd64"
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
# arm64 only
- goarch: arm64
dockerfile: goreleaser.Dockerfile
use: buildx
image_templates:
- "docker.io/divideprojects/{{ .ProjectName }}:{{ .Tag }}-arm64v8"
- "ghcr.io/gigauserbot/{{ .ProjectName }}:{{ .Tag }}-arm64v8"
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
docker_manifests:
# docker hub
- name_template: "docker.io/divideprojects/{{ .ProjectName }}:{{ .Version }}"
image_templates:
- "docker.io/divideprojects/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "docker.io/divideprojects/{{ .ProjectName }}:{{ .Tag }}-arm64v8"
- name_template: "docker.io/divideprojects/{{ .ProjectName }}:latest"
image_templates:
- "docker.io/divideprojects/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "docker.io/divideprojects/{{ .ProjectName }}:{{ .Tag }}-arm64v8"
# github container registry
- name_template: "ghcr.io/gigauserbot/{{ .ProjectName }}:{{ .Version }}"
image_templates:
- "ghcr.io/gigauserbot/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "ghcr.io/gigauserbot/{{ .ProjectName }}:{{ .Tag }}-arm64v8"
- name_template: "ghcr.io/gigauserbot/{{ .ProjectName }}:latest"
image_templates:
- "ghcr.io/gigauserbot/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "ghcr.io/gigauserbot/{{ .ProjectName }}:{{ .Tag }}-arm64v8"