Updated .goreleaser and added Dockerfile and LICENSE

This commit is contained in:
Winni Neessen 2024-03-13 22:36:46 +01:00
parent ddb7b678eb
commit e5f97ee2f0
3 changed files with 67 additions and 14 deletions

View file

@ -6,10 +6,9 @@ version: 1
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
- go mod download
- go mod verify
builds:
- env:
@ -21,20 +20,30 @@ builds:
- freebsd
- openbsd
- netbsd
goarch:
- 386
- arm
- arm64
- amd64
- ppc64le
- s390x
goarm:
- 6
- 7
goamd64:
- v1
- v2
- v3
main: ./cmd/apg
binary: apg
ldflags:
- -w -s -extldflags "-static"
ignore:
- goos: darwin
goarch: 386
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
@ -48,23 +57,33 @@ changelog:
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: checksum
- artifacts: all
stdin: "{{ .Env.GPG_PASSWORD }}"
args: ["-u", "wn@neessen.dev", "--output", "${signature}", "--detach-sign", "${artifact}"]
@ -77,4 +96,14 @@ gitea_urls:
dockers:
- image_templates:
- wneessen/apg-go
- wneessen/apg-go
build_flag_templates:
- "--network=host"
docker_signs:
- artifacts: all
stdin: '{{ .Env.COSIGN_PWD }}'
cmd: cosign
gomod:
mod: mod

3
Dockerfile Normal file
View file

@ -0,0 +1,3 @@
FROM scratch
ENTRYPOINT ["/apg"]
COPY apg /

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021-2024 Winni Neessen <wn@neessen.dev>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.