-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
69 lines (60 loc) · 1.36 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
project_name: import
env:
- CGO_ENABLED=0
- DOCKER_REPO={{ if index .Env "DOCKER_REPO" }}{{ .Env.DOCKER_REPO }}{{ else }}docker.jw4.us/import{{ end }}
before:
hooks:
- go mod tidy
- go mod download
builds:
- id: cli
main: ./cmd/api
binary: api
ldflags:
- -s
- -w
- -extldflags "-static"
tags:
- netgo
goos:
- linux
goarch:
- amd64
- arm64
mod_timestamp: '{{ .CommitTimestamp }}'
dockers:
- id: amd64
use: buildx
goarch: amd64
extra_files:
- public/
image_templates:
- "{{ .Env.DOCKER_REPO }}:{{ .Tag }}-amd64"
build_flag_templates:
- "--platform=linux/amd64"
- id: arm64
use: buildx
goarch: arm64
extra_files:
- public/
image_templates:
- "{{ .Env.DOCKER_REPO }}:{{ .Tag }}-arm64v8"
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
- id: main
name_template: "{{ .Env.DOCKER_REPO }}:{{ .Tag }}"
image_templates:
- "{{ .Env.DOCKER_REPO }}:{{ .Tag }}-amd64"
- "{{ .Env.DOCKER_REPO }}:{{ .Tag }}-arm64v8"
- id: latest
name_template: "{{ .Env.DOCKER_REPO }}:latest"
image_templates:
- "{{ .Env.DOCKER_REPO }}:{{ .Tag }}-amd64"
- "{{ .Env.DOCKER_REPO }}:{{ .Tag }}-arm64v8"
archives:
- format: binary
release:
disable: true
checksum:
disable: true