Refactor .goreleaser.yaml for improved release management and update README with installation instructions

Add script to append release notes and enhance publish-apt.sh for asset downloading

Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
This commit is contained in:
Marc Schäfer
2026-02-22 23:05:06 +01:00
parent 0f6852b681
commit 53d79aea5a
4 changed files with 74 additions and 43 deletions

View File

@@ -1,42 +1,33 @@
version: 2
project_name: newt
release:
# du nutzt Tags wie 1.2.3 und 1.2.3-rc.1 (ohne v)
draft: true
prerelease: auto
prerelease: "{{ contains .Tag \"-rc.\" }}"
name_template: "{{ .Tag }}"
mode: replace
builds:
- id: newt
main: ./main.go # <- falls du cmd/newt hast: ./cmd/newt
main: ./main.go
binary: newt
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
- freebsd
goarch:
- amd64
- arm64
goarm:
- "6"
- "7"
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{ .Tag }}
- -s -w -X main.newtVersion={{ .Tag }}
archives:
# Wichtig: format "binary" -> keine tar.gz, sondern raw binary wie bei dir aktuell
- id: raw
- id: binaries
builds:
- newt
format: binary
name_template: >-
{{ .ProjectName }}_{{ .Os }}_{{ if eq .Arch "amd64" }}amd64{{ else if eq .Arch "arm64" }}arm64{{ else if eq .Arch "386" }}386{{ else }}{{ .Arch }}{{ end }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}{{ if .Amd64 }}_{{ .Amd64 }}{{ end }}{{ if .Riscv64 }}_{{ .Riscv64 }}{{ end }}{{ if .Os | eq "windows" }}.exe{{ end }}
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: "checksums.txt"
@@ -49,14 +40,13 @@ nfpms:
vendor: fosrl
maintainer: fosrl <repo@fosrl.io>
description: Newt - userspace tunnel client and TCP/UDP proxy
license: AGPL-3.0
license: AGPL-3.0-or-later
formats:
- deb
- rpm
- apk
bindir: /usr/bin
# sorgt dafür, dass die Paketnamen gut pattern-matchbar sind
file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}"
file_name_template: "newt_{{ .Version }}_{{ .Arch }}"
contents:
- src: LICENSE
dst: /usr/share/doc/newt/LICENSE