-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
114 lines (108 loc) · 3.74 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
# doc: https://goreleaser.com
project_name: traefik-github-oauth-server
before:
hooks:
- go mod tidy
builds:
- id: traefik-github-oauth-server
main: ./cmd/traefik-github-oauth-server
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- "386"
- arm64
- arm
ldflags:
- -s
- -w
- -X main.version={{ .Version }}
- -X main.commit={{ .Commit }}
- -X main.date={{ .Date }}
- -X main.builtBy=goreleaser
mod_timestamp: "{{ .CommitTimestamp }}"
dockers:
- use: buildx
goos: linux
goarch: amd64
image_templates:
- "luizfonseca/{{ .ProjectName }}:{{ .Version }}-amd64"
- "luizfonseca/{{ .ProjectName }}:latest-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 }}"
- use: buildx
goos: linux
goarch: "386"
image_templates:
- "luizfonseca/{{ .ProjectName }}:{{ .Version }}-i386"
- "luizfonseca/{{ .ProjectName }}:latest-i386"
build_flag_templates:
- "--platform=linux/386"
- "--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 }}"
- use: buildx
goos: linux
goarch: arm64
image_templates:
- "luizfonseca/{{ .ProjectName }}:{{ .Version }}-arm64"
- "luizfonseca/{{ .ProjectName }}:latest-arm64"
build_flag_templates:
- "--platform=linux/arm64"
- "--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 }}"
- use: buildx
goos: linux
goarch: arm
image_templates:
- "luizfonseca/{{ .ProjectName }}:{{ .Version }}-arm"
- "luizfonseca/{{ .ProjectName }}:latest-arm"
build_flag_templates:
- "--platform=linux/arm/v6"
- "--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:
- name_template: "luizfonseca/{{ .ProjectName }}:{{ .Version }}"
image_templates:
- "luizfonseca/{{ .ProjectName }}:{{ .Version }}-amd64"
- "luizfonseca/{{ .ProjectName }}:{{ .Version }}-i386"
- "luizfonseca/{{ .ProjectName }}:{{ .Version }}-arm64"
- "luizfonseca/{{ .ProjectName }}:{{ .Version }}-arm"
- name_template: "luizfonseca/{{ .ProjectName }}:latest"
image_templates:
- "luizfonseca/{{ .ProjectName }}:latest-amd64"
- "luizfonseca/{{ .ProjectName }}:latest-i386"
- "luizfonseca/{{ .ProjectName }}:latest-arm64"
- "luizfonseca/{{ .ProjectName }}:latest-arm"
archives:
- id: tar.gz
format: tar.gz
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ if eq .Arch "386" }}i386{{ else }}{{ .Arch }}{{ end }}'
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
- id: binary
format: binary
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ if eq .Arch "386" }}i386{{ else }}{{ .Arch }}{{ end }}'
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Version }}-next"