This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
80 lines (74 loc) · 2.7 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
release:
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
prerelease: false
builds:
- binary: xeol-agent
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
# Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build)
mod_timestamp: '{{ .CommitTimestamp }}'
ldflags: |
-w
-s
-extldflags '-static'
-X github.com/xeol-io/xeol-agent/internal/version.version={{.Version}}
-X github.com/xeol-io/xeol-agent/internal/version.gitCommit={{.Commit}}
-X github.com/xeol-io/xeol-agent/internal/version.buildDate={{.Date}}
-X github.com/xeol-io/xeol-agent/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}}
archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
dockers:
- image_templates:
- "noqcks/xeol-agent:latest"
- "noqcks/xeol-agent:{{ .Tag }}-amd64"
- "noqcks/xeol-agent:v{{ .Major }}-amd64"
- "noqcks/xeol-agent:v{{ .Major }}.{{ .Minor }}-amd64"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
- image_templates:
- "noqcks/xeol-agent:{{ .Tag }}-arm64v8"
- "noqcks/xeol-agent:v{{ .Major }}-arm64v8"
- "noqcks/xeol-agent:v{{ .Major }}.{{ .Minor }}-arm64v8"
goarch: arm64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
docker_manifests:
- name_template: noqcks/xeol-agent:{{ .Tag }}
image_templates:
- noqcks/xeol-agent:{{ .Tag }}-amd64
- noqcks/xeol-agent:v{{ .Major }}-amd64
- noqcks/xeol-agent:v{{ .Major }}.{{ .Minor }}-amd64
- noqcks/xeol-agent:{{ .Tag }}-arm64v8
- noqcks/xeol-agent:v{{ .Major }}-arm64v8
- noqcks/xeol-agent:v{{ .Major }}.{{ .Minor }}-arm64v8
- name_template: noqcks/xeol-agent:latest
image_templates:
- noqcks/xeol-agent:{{ .Tag }}-amd64
- noqcks/xeol-agent:v{{ .Major }}-amd64
- noqcks/xeol-agent:v{{ .Major }}.{{ .Minor }}-amd64
- noqcks/xeol-agent:{{ .Tag }}-arm64v8
- noqcks/xeol-agent:v{{ .Major }}-arm64v8
- noqcks/xeol-agent:v{{ .Major }}.{{ .Minor }}-arm64v8