-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
.goreleaser.yml
116 lines (116 loc) · 4.68 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
project_name: traggo
builds:
- id: linux-amd64
main: ./
goos: [linux]
goarch: ['amd64']
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"']
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"]
- id: linux-386
main: ./
goos: [linux]
goarch: ['386']
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"']
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"]
- id: linux-armhf
main: ./
goos: [linux]
goarch: [arm]
goarm: [7]
env: [CC=arm-linux-gnueabihf-gcc, CXX=arm-linux-gnueabihf-g++]
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"']
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"]
- id: linux-arm64
main: ./
goos: [linux]
goarch: [arm64]
env: [CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++]
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"']
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"]
- id: windows-amd64
main: ./
goos: [windows]
goarch: [amd64]
env: [CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-gcc]
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"']
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"]
archives:
- files:
- LICENSE
- README.md
- .env.sample
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
format_overrides:
- goos: windows
format: zip
checksum:
disable: true
changelog:
skip: true
dockers:
- use: buildx
goos: linux
goarch: amd64
image_templates:
- "traggo/server:amd64-latest"
- "traggo/server:amd64-{{ .RawVersion }}"
dockerfile: docker/Dockerfile
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}}"
- use: buildx
goos: linux
goarch: '386'
image_templates:
- "traggo/server:386-latest"
- "traggo/server:386-{{ .RawVersion }}"
dockerfile: docker/Dockerfile
build_flag_templates:
- "--platform=linux/386"
- "--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:
- "traggo/server:arm64-latest"
- "traggo/server:arm64-{{ .RawVersion }}"
dockerfile: docker/Dockerfile
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}}"
- use: buildx
goos: linux
goarch: arm
goarm: 7
image_templates:
- "traggo/server:armv7-latest"
- "traggo/server:armv7-{{ .RawVersion }}"
dockerfile: docker/Dockerfile
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}}"
docker_manifests:
- name_template: "traggo/server:latest"
image_templates:
- "traggo/server:amd64-latest"
- "traggo/server:386-latest"
- "traggo/server:arm64-latest"
- "traggo/server:armv7-latest"
- name_template: "traggo/server:{{ .RawVersion }}"
image_templates:
- "traggo/server:amd64-{{ .RawVersion }}"
- "traggo/server:386-{{ .RawVersion }}"
- "traggo/server:arm64-{{ .RawVersion }}"
- "traggo/server:armv7-{{ .RawVersion }}"