Skip to content

Commit 4fe84a6

Browse files
committed
add goreleaser configuration for building and packaging
1 parent 398502e commit 4fe84a6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.goreleaser.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
3+
builds:
4+
- env:
5+
- CGO_ENABLED=0
6+
goos:
7+
- linux
8+
- windows
9+
- darwin
10+
goarch:
11+
- amd64
12+
- arm64
13+
ldflags:
14+
- -s -w
15+
- -X main.version={{.Version}}
16+
- -X main.commit={{.Commit}}
17+
- -X main.date={{.Date}}
18+
dockers:
19+
- image_templates: ["ghcr.io/shaharia-lab/telemetry-forwarder:{{ .Version }}"]
20+
dockerfile: goreleaser.dockerfile
21+
build_flag_templates:
22+
- --label=org.opencontainers.image.title={{ .ProjectName }}
23+
- --label=org.opencontainers.image.description={{ .ProjectName }}
24+
- --label=org.opencontainers.image.url=https://github.com/shaharia-lab/telemetry-forwarder
25+
- --label=org.opencontainers.image.source=https://github.com/shaharia-lab/telemetry-forwarder
26+
- --label=org.opencontainers.image.version={{ .Version }}
27+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
28+
- --label=org.opencontainers.image.licenses=MIT

0 commit comments

Comments
 (0)