-
Notifications
You must be signed in to change notification settings - Fork 15
/
.goreleaser.yml
86 lines (75 loc) · 2.52 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
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
version: 2
builds:
- env:
- CGO_ENABLED=0 # this is needed otherwise the Docker image build is faulty
goarch:
- amd64
- arm64
- arm
goos:
- linux
goarm:
- 7
archives:
- format: binary
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ .Tag }}-snapshot"
signs:
- artifacts: checksum
args: ["-u", "3E0B9A63FF344E7CB445BD84ED35499391B64DB4", "--output", "${signature}", "--detach-sign", "${artifact}"]
dockers:
- goarch: amd64
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
image_templates:
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-amd64"
- goarch: arm64
use: buildx
build_flag_templates:
- "--platform=linux/arm64/v8"
image_templates:
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-arm64"
- goarch: arm
goarm: "7"
use: buildx
build_flag_templates:
- "--platform=linux/arm/v7"
image_templates:
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-armv7"
docker_manifests:
# For prereleases, updating `latest` does not make sense.
# Only the image for the exact version should be pushed.
- name_template: "{{ if not .Prerelease }}ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:latest{{ end }}"
image_templates:
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-arm64"
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-armv7"
- name_template: "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}"
image_templates:
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-arm64"
- "ghcr.io/{{ .Env.IMAGE_REPOSITORY }}:v{{ .Version }}-armv7"
nfpms:
- vendor: ccremer
homepage: https://github.com/ccremer/fronius-exporter
maintainer: ccremer
description: Prometheus Exporter for Fronius Symo Photovoltaics
license: Apache 2.0
file_name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
formats:
- deb
- rpm
contents:
- src: examples/systemd.service
dst: /lib/systemd/system/fronius-exporter.service
- src: examples/systemd.env
dst: /etc/default/fronius-exporter
type: config
release:
prerelease: auto