-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.goreleaser.yml
106 lines (95 loc) · 3.14 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
# Configuration for GoReleaser
# https://goreleaser.com/
#
# Local test: contrib/build-all
#
version: 2
project_name: prometheus-paperless-exporter
builds:
- main: .
binary: prometheus-paperless-exporter
env:
- CGO_ENABLED=0
targets:
- go_first_class
flags:
- -trimpath
ldflags: |
-s -w
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.FullCommit}}
-X github.com/prometheus/common/version.Branch={{.Branch}}
-X github.com/prometheus/common/version.BuildDate={{.Date}}
nfpms:
- description: Prometheus metrics for Paperless-ngx
maintainer: M. Hanselmann
bindir: /usr/bin
license: BSD-3-Clause
formats:
- deb
- rpm
contents:
- src: ./README.md
dst: /usr/share/doc/prometheus-paperless-exporter/README.md
- src: ./LICENSE
dst: /usr/share/doc/prometheus-paperless-exporter/LICENSE
archives:
- format: tar.gz
wrap_in_directory: true
files:
- LICENSE
- README.md
dockers:
- use: buildx
goos: linux
goarch: amd64
dockerfile: contrib/Dockerfile.goreleaser
extra_files: &docker_extra_files
- LICENSE
- README.md
image_templates:
- ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}-amd64
build_flag_templates:
- --pull
- --platform=linux/amd64
- --label=org.opencontainers.image.created={{.Date}}
- --label=org.opencontainers.image.name={{.ProjectName}}
- --label=org.opencontainers.image.revision={{.FullCommit}}
- --label=org.opencontainers.image.version={{.Version}}
- --label=org.opencontainers.image.source={{.GitURL}}
- use: buildx
goos: linux
goarch: arm64
dockerfile: contrib/Dockerfile.goreleaser
extra_files: *docker_extra_files
image_templates:
- ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}-arm64
build_flag_templates:
- --pull
- --platform=linux/arm64
- --label=org.opencontainers.image.created={{.Date}}
- --label=org.opencontainers.image.name={{.ProjectName}}
- --label=org.opencontainers.image.revision={{.FullCommit}}
- --label=org.opencontainers.image.version={{.Version}}
- --label=org.opencontainers.image.source={{.GitURL}}
docker_manifests:
- name_template: ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}
image_templates: &docker_manifest_image_templates
- ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}-amd64
- ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}-arm64
- name_template: ghcr.io/hansmi/prometheus-paperless-exporter:v{{.Major}}
image_templates: *docker_manifest_image_templates
- name_template: ghcr.io/hansmi/prometheus-paperless-exporter:latest
image_templates: *docker_manifest_image_templates
changelog:
groups:
- title: Dependencies
regexp: '(?i)^[a-f0-9]{8,64}\s+Bump\s+[-.\w]+/\w.*\sto\s'
order: 1
- order: 0
release:
draft: true
prerelease: auto
snapshot:
version_template: '{{ incpatch .Version }}-snapshot{{ replace (replace .Date ":" "") "-" "" }}+g{{ .ShortCommit }}'
# vim: set sw=2 sts=2 et :