mirror of
https://github.com/wneessen/apg-go.git
synced 2024-09-19 03:12:47 +02:00
Winni Neessen
f871dfb82b
Extended the .goreleaser.yaml configuration with build_flag_templates options for the Docker image. These new flags introduce image labels for open containers, which provides more detailed image information including the creation date, project name, revision, and version.
111 lines
No EOL
2.3 KiB
YAML
111 lines
No EOL
2.3 KiB
YAML
# SPDX-FileCopyrightText: 2021-2024 Winni Neessen <wn@neessen.dev>
|
|
#
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
version: 1
|
|
|
|
before:
|
|
hooks:
|
|
- go test -cover -race -shuffle=on
|
|
- go mod tidy
|
|
- go mod download
|
|
- go mod verify
|
|
|
|
builds:
|
|
- env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
- freebsd
|
|
- openbsd
|
|
- netbsd
|
|
goarch:
|
|
- 386
|
|
- arm
|
|
- arm64
|
|
- amd64
|
|
- ppc64le
|
|
- s390x
|
|
- mips
|
|
- mips64
|
|
- mipsle
|
|
- mips64le
|
|
goarm:
|
|
- 6
|
|
goamd64:
|
|
- v1
|
|
main: ./cmd/apg
|
|
binary: apg
|
|
ldflags:
|
|
- -w -s -extldflags "-static"
|
|
|
|
archives:
|
|
- format: tar.gz
|
|
format_overrides:
|
|
- goos: windows
|
|
format: zip
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- "^docs:"
|
|
- "^test:"
|
|
|
|
nfpms:
|
|
- vendor: Winni Neessen
|
|
homepage: https://src.neessen.cloud/wneessen/apg-go
|
|
maintainer: Winni Neessen <wn@neessen.dev>
|
|
description: |-
|
|
A "Automated Password Generator"-clone written in Go
|
|
license: MIT
|
|
formats:
|
|
- apk
|
|
- deb
|
|
- rpm
|
|
- termux.deb
|
|
- archlinux
|
|
file_name_template: >-
|
|
{{- trimsuffix .ConventionalFileName .ConventionalExtension -}}
|
|
{{- if and (eq .Arm "6") (eq .ConventionalExtension ".deb") }}6{{ end -}}
|
|
{{- if not (eq .Amd64 "v1")}}{{ .Amd64 }}{{ end -}}
|
|
{{- .ConventionalExtension -}}
|
|
|
|
dmg:
|
|
- replace: true
|
|
|
|
universal_binaries:
|
|
- replace: true
|
|
|
|
report_sizes: true
|
|
|
|
signs:
|
|
- artifacts: all
|
|
stdin: "{{ .Env.GPG_PASSWORD }}"
|
|
args: ["-u", "wn@neessen.dev", "--output", "${signature}", "--detach-sign", "${artifact}"]
|
|
|
|
sboms:
|
|
- artifacts: archive
|
|
|
|
gitea_urls:
|
|
api: https://src.neessen.cloud/api/v1
|
|
download: https://src.neessen.cloud
|
|
|
|
gomod:
|
|
mod: mod
|
|
|
|
dockers:
|
|
- image_templates:
|
|
- "wneessen/apg-go:{{ .Tag }}"
|
|
- "wneessen/apg-go:v{{ .Major }}"
|
|
- "wneessen/apg-go:v{{ .Major }}.{{ .Minor }}"
|
|
- "wneessen/apg-go:latest"
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--network=host"
|
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
|
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
|
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
|
- "--label=org.opencontainers.image.version={{.Version}}" |