-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathgoreleaser.yaml
More file actions
86 lines (78 loc) · 1.96 KB
/
goreleaser.yaml
File metadata and controls
86 lines (78 loc) · 1.96 KB
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
# IDEA auto formatter is causing trouble
# @formatter:off
version: 2
before:
hooks:
- "go mod verify"
env:
- "GO111MODULE=on"
- "CGO_ENABLED=0"
builds:
- id: "alwaysonline"
main: "."
binary: "alwaysonline"
mod_timestamp: "{{ .CommitTimestamp }}"
goos: ["linux", "darwin", "windows"]
goarch: ["amd64", "arm64"]
goamd64: ["v3"]
flags:
- "-v"
- "-trimpath"
- "-buildvcs=true"
asmflags:
- "all=-trimpath={{ .Env.GOPATH }}"
gcflags:
- "all=-trimpath={{ .Env.GOPATH }}"
ldflags:
- "-s"
- "-w"
- "-X \"main.versionMajor={{ .Major }}\""
- "-X \"main.versionMinor={{ .Minor }}\""
- "-X \"main.versionRevision={{ .Patch }}\""
- "-X \"main.versionGitCommitHash={{ .Commit }}\""
- "-X \"main.versionCompileTime={{ .CommitTimestamp }}\""
hooks:
post:
- "sh -c 'upx \"{{ .Path }}\" || true'"
- "sudo setcap 'cap_net_bind_service=+ep' \"{{ .Path }}\""
snapshot:
version_template: "{{ incpatch .Version }}-next"
archives:
- id: "release"
formats: ["tar.xz"]
wrap_in_directory: true
dockers:
- dockerfile: "Dockerfile.goreleaser"
goarch: amd64
goamd64: v3
image_templates:
- jamesits/alwaysonline:{{ .Version }}-amd64
build_flag_templates:
- "--platform=linux/amd64"
- dockerfile: "Dockerfile.goreleaser"
goarch: arm64
image_templates:
- jamesits/alwaysonline:{{ .Version }}-arm64
build_flag_templates:
- "--platform=linux/arm64"
docker_manifests:
- name_template: "jamesits/alwaysonline:{{ .Version }}"
image_templates:
- jamesits/alwaysonline:{{ .Version }}-amd64
- jamesits/alwaysonline:{{ .Version }}-arm64
checksum:
name_template: "checksums.txt"
algorithm: "sha256"
changelog:
sort: "asc"
filters:
exclude:
- "^doc:"
- "^docs:"
- "^test:"
- "^cleanup:"
- "^ci:"
- "typo"
- "readme"
- "README"
- "comment"