prometheus-paperless-exporter/.goreleaser.yml

113 lines
3.4 KiB
YAML
Raw Permalink Normal View History

# 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
2024-09-22 01:19:37 +02:00
goos:
- linux
goarch:
- amd64
- arm64
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:
2024-09-22 01:19:37 +02:00
- use: buildx
goos: linux
goarch: amd64
dockerfile: contrib/Dockerfile.goreleaser
2024-09-22 01:19:37 +02:00
image_templates:
- ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}-amd64
- ghcr.io/hansmi/prometheus-paperless-exporter:v{{.Major}}-amd64
extra_files:
- LICENSE
- README.md
2024-09-22 01:19:37 +02:00
build_flag_templates:
- --platform=linux/amd64
- --pull
- --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
image_templates:
2024-09-22 01:19:37 +02:00
- ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}-arm64
- ghcr.io/hansmi/prometheus-paperless-exporter:v{{.Major}}-arm64
extra_files:
- LICENSE
- README.md
build_flag_templates:
2024-09-22 01:19:37 +02:00
- --platform=linux/arm64
- --pull
- --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}}
2024-09-22 01:19:37 +02:00
docker_manifests:
- name_template: ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}
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:
- ghcr.io/hansmi/prometheus-paperless-exporter:v{{.Major}}-amd64
- ghcr.io/hansmi/prometheus-paperless-exporter:v{{.Major}}-arm64
- name_template: ghcr.io/hansmi/prometheus-paperless-exporter:latest
image_templates:
- ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}-amd64
- ghcr.io/hansmi/prometheus-paperless-exporter:{{.Tag}}-arm64
release:
draft: true
prerelease: auto
snapshot:
name_template: '{{ incpatch .Version }}-snapshot{{ replace (replace .Date ":" "") "-" "" }}+g{{ .ShortCommit }}'
# vim: set sw=2 sts=2 et :