-
Notifications
You must be signed in to change notification settings - Fork 68
/
.goreleaser.yml
117 lines (117 loc) · 3.55 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
version: 2
env:
- CGO_ENABLED=1
builds:
- id: linux-amd64
main: ./
binary: parca-agent
goos:
- linux
goarch:
- amd64
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
- -v
ldflags:
# https://goreleaser.com/customization/build/#reproducible-builds
# {{.CommitDate}} is the date of the commit to make builds reproducible.
- -X main.version={{.Version}} -X main.commit={{.FullCommit}} -X main.date={{.CommitDate}} -X main.goArch=amd64
- -extldflags=-static
tags:
- osusergo
- netgo
- id: linux-arm64
main: ./
binary: parca-agent
goos:
- linux
goarch:
- arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
- -v
ldflags:
# https://goreleaser.com/customization/build/#reproducible-builds
# {{.CommitDate}} is the date of the commit to make builds reproducible.
- -X main.version={{.Version}} -X main.commit={{.FullCommit}} -X main.date={{.CommitDate}} -X main.goArch=arm64
- -extldflags=-static
tags:
- osusergo
- netgo
archives:
- name_template: >-
{{ .ProjectName }}_
{{- trimprefix .Version "v" }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end }}
format: binary
format_overrides:
- goos: windows
format: zip
files:
- 'LICENSE*'
- 'README*'
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Branch }}-{{ .ShortCommit }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
github:
owner: parca-dev
name: parca-agent
prerelease: auto
draft: false
name_template: '{{ .Tag }}'
dockers:
- image_templates: ["ghcr.io/parca-dev/{{ .ProjectName }}:{{ .Tag }}-amd64"]
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- --pull
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://parca.dev/
- --label=org.opencontainers.image.source=https://github.com/parca-dev/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Tag }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
- image_templates: ["ghcr.io/parca-dev/{{ .ProjectName }}:{{ .Tag }}-arm64"]
goarch: arm64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- --pull
- --platform=linux/arm64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://parca.dev/
- --label=org.opencontainers.image.source=https://github.com/parca-dev/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Tag }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
docker_manifests:
- name_template: ghcr.io/parca-dev/{{ .ProjectName }}:{{ .Tag }}
image_templates:
- ghcr.io/parca-dev/{{ .ProjectName }}:{{ .Tag }}-amd64
- ghcr.io/parca-dev/{{ .ProjectName }}:{{ .Tag }}-arm64
- name_template: ghcr.io/parca-dev/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/parca-dev/{{ .ProjectName }}:{{ .Tag }}-amd64
- ghcr.io/parca-dev/{{ .ProjectName }}:{{ .Tag }}-arm64