feat(goreleaser): Completely clean up the package release
All checks were successful
Mirror Push / mirror (push) Successful in 13s
Test / test (oldstable) (push) Successful in 38s
Test / test (stable) (push) Successful in 40s

This commit is contained in:
Sam Therapy 2023-11-08 19:22:47 +01:00
parent 74bd7f43cd
commit f3582534e4
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
5 changed files with 102 additions and 37 deletions

View file

@ -33,3 +33,5 @@ jobs:
args: release --rm-dist
env:
GITEA_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
UPLOAD_PACKAGES_USERNAME: sam
UPLOAD_PACKAGES_SECRET: ${{ secrets.PUBLISH_TOKEN }}

View file

@ -30,6 +30,6 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --rm-dist --skip=homebrew,nix,scoop,upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -27,7 +27,10 @@ archives:
{{- if eq .Os "darwin" }}MacOS_
{{- else if eq .Os "freebsd" }}FreeBSD_
{{- else }}{{- title .Os }}_{{ end }}
{{- .Arch }}
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "mips64" }}mips64_hardfloat
{{- else if eq .Arch "mips64le" }}mips64le_hardfloat
{{- else }}{{ .Arch }}{{ end -}}
format_overrides:
- goos: windows
format: zip
@ -73,7 +76,7 @@ changelog:
brews:
- repository:
owner: sam
owner: packaging
name: homebrew
homepage: https://dns.froth.zone/awl
description: A DNS query tool
@ -89,54 +92,112 @@ brews:
scoops:
- repository:
owner: sam
owner: packaging
name: scoop
folder: bucket
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: BSD-3-Clause
nix:
-
repository:
owner: packaging
name: nur
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: BSD-3-Clause
extra_install:
installManPage ./doc/awl.1.gz
post_install: |
installShellCompletion ./completions/*
nfpms:
- id: packages
maintainer: Sam <sam@samtherapy.net>
homepage: https://dns.froth.zone/awl
package_name: awl-dns
vendor: Sam Therapy <sam@samtherapy.net>
maintainer: Sam Therapy <sam@samtherapy.net>
homepage: https://dns.froth.zone/awl
description: |-
Command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
license: BSD-3-Clause
section: utils
bindir: /usr/bin
formats:
- apk
- archlinux
- deb
- rpm
contents:
- src: completions/bash.bash
dst: /usr/share/bash-completion/completions/awl
- src: doc/awl.1.gz
dst: /usr/share/man/man1/awl.1.gz
- src: LICENCE
dst: /usr/share/doc/awl/copyright
- src: completions/fish.fish
dst: /usr/share/fish/vendor_completions.d/awl.fish
# DEB only
- src: completions/zsh.zsh
dst: /usr/share/zsh/vendor-completions/_awl
packager: deb
# Alpine .apk only
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: apk
# RPM only
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: rpm
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
overrides:
deb:
file_name_template: >-
{{- .PackageName }}_
{{- .Version }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "arm" }}armel
{{- else }}{{ .Arch }}{{ end -}}
rpm:
file_name_template: >-
{{- .PackageName }}-
{{- .Version }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i686
{{- else if eq .Arch "arm" }}armhfp
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end -}}
- id: termux
package_name: awl-dns
vendor: Sam Therapy <sam@samtherapy.net>
maintainer: Sam Therapy <sam@samtherapy.net>
homepage: https://dns.froth.zone/awl
description: |-
Command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
license: BSD-3-Clause
section: utils
formats:
- deb
- rpm
- apk
- termux.deb
contents:
- src: completions/bash.bash
dst: /usr/share/bash-completion/completions/awl
- src: completions/zsh.zsh
dst: /usr/share/zsh/vendor-completions/_awl
packager: deb
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: apk
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: rpm
- src: completions/fish.fish
dst: /usr/share/fish/vendor_completions.d/awl.fish
- src: doc/awl.1.gz
dst: /usr/share/man/man1/awl.1.gz
- src: LICENCE
dst: /usr/share/doc/awl/copyright
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
file_name_template: >-
{{- .PackageName }}_
{{- .Version }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i686
{{- else if eq .Arch "arm" }}arm
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end -}}
uploads:
-
name: Packages
name: packages
method: PUT
mode: archive
exts:
- deb
- rpm
@ -145,10 +206,11 @@ uploads:
username: sam
target: >-
https://git.froth.zone/api/packages/sam/
{{- if eq .LinuxPackage "deb" }}debian/pool/sid/main/upload
{{- else if eq .Os "termux.deb" }}debian/pool/termux/main/upload
{{- else if eq .Os "rpm" }}rpm/upload
{{- else if eq .Os "apk" }}alpine/edge/main
{{- if eq .ArtifactExt "deb" }}debian/pool/sid/main/upload
{{- else if eq .ArtifactExt "termux.deb" }}debian/pool/termux/main/upload
{{- else if eq .ArtifactExt "rpm" }}rpm/upload
{{- else if eq .ArtifactExt "apk" }}alpine/edge/main{{ end -}}
custom_artifact_name: true # Truncate the artifact name from the upload URL
gitea_urls:
api: https://git.froth.zone/api/v1

View file

@ -65,7 +65,7 @@ Grab a prebuilt binary from the
- Scoop:
```pwsh
scoop bucket add froth https://git.froth.zone/sam/scoop.git
scoop bucket add froth https://git.froth.zone/packages/scoop.git
scoop install awl
```

View file

@ -89,6 +89,7 @@ clean:
# Ignore errors if you remove something that doesn't exist
rm -f doc/$(PROG).1
rm -f coverage/cover*
rm -rf vendor
## help: Prints this help message
.PHONY: help