-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.goreleaser.yml
118 lines (107 loc) · 3.93 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
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
project_name: contentserver
release:
github:
owner: foomo
name: contentserver
prerelease: auto
builds:
- binary: contentserver
goos:
- windows
- darwin
- linux
goarch:
- amd64
- arm64
goarm:
- '7'
env:
- CGO_ENABLED=0
main: ./main.go
flags:
- -trimpath
ldflags: -s -w -X github.com/foomo/contentserver/cmd.version={{.Version}}
archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
changelog:
use: github-native
brews:
# Repository to push the tap to.
- repository:
owner: foomo
name: homebrew-tap
caveats: "sesamy --help"
homepage: "https://github.com/foomo/contentserver"
description: "Serves content tree structures very quickly"
test: |
system "#{bin}/contentserver --version"
dockers:
- use: buildx
goos: linux
goarch: amd64
dockerfile: build/buildx.Dockerfile
image_templates:
- '{{ if eq .Prerelease "" }}foomo/contentserver:latest-amd64{{ end }}'
- 'foomo/contentserver:{{ .Version }}-amd64'
- '{{ if eq .Prerelease "" }}foomo/contentserver:{{ .Major }}-amd64{{ end }}'
- '{{ if eq .Prerelease "" }}foomo/contentserver:{{ .Major }}.{{ .Minor }}-amd64{{ end }}'
build_flag_templates:
- '--pull'
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
- '--label=org.opencontainers.image.title={{.ProjectName}}'
- '--label=org.opencontainers.image.description=Serves content tree structures very quickly'
- '--label=org.opencontainers.image.source={{.GitURL}}'
- '--label=org.opencontainers.image.url={{.GitURL}}'
- '--label=org.opencontainers.image.documentation={{.GitURL}}'
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--platform=linux/amd64'
- use: buildx
goos: linux
goarch: arm64
dockerfile: build/buildx.Dockerfile
image_templates:
- '{{ if eq .Prerelease "" }}foomo/contentserver:latest-arm64{{ end }}'
- 'foomo/contentserver:{{ .Version }}-arm64'
- '{{ if eq .Prerelease "" }}foomo/contentserver:{{ .Major }}-arm64{{ end }}'
- '{{ if eq .Prerelease "" }}foomo/contentserver:{{ .Major }}.{{ .Minor }}-arm64{{ end }}'
build_flag_templates:
- '--pull'
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
- '--label=org.opencontainers.image.title={{.ProjectName}}'
- '--label=org.opencontainers.image.description=Serves content tree structures very quickly'
- '--label=org.opencontainers.image.source={{.GitURL}}'
- '--label=org.opencontainers.image.url={{.GitURL}}'
- '--label=org.opencontainers.image.documentation={{.GitURL}}'
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--platform=linux/arm64'
docker_manifests:
# basic
- name_template: 'foomo/contentserver:latest'
image_templates:
- 'foomo/contentserver:latest-amd64'
- 'foomo/contentserver:latest-arm64'
skip_push: auto
- name_template: 'foomo/contentserver:{{ .Version }}'
image_templates:
- 'foomo/contentserver:{{ .Version }}-amd64'
- 'foomo/contentserver:{{ .Version }}-arm64'
- name_template: 'foomo/contentserver:{{ .Major }}'
image_templates:
- 'foomo/contentserver:{{ .Major }}-amd64'
- 'foomo/contentserver:{{ .Major }}-arm64'
skip_push: auto
- name_template: 'foomo/contentserver:{{ .Major }}.{{ .Minor }}'
image_templates:
- 'foomo/contentserver:{{ .Major }}.{{ .Minor }}-amd64'
- 'foomo/contentserver:{{ .Major }}.{{ .Minor }}-arm64'
skip_push: auto