From 28a80067cbbb2be1d9828a5d8dbaaab3b4b87bd3 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 25 Mar 2026 17:08:48 +0200 Subject: ci: Create .goreleaser.yml for automated releases Configuration includes: - Go module tidy hook - Builds for Linux, macOS, Windows on amd64 and arm64 - Tar.gz and ZIP archives with proper naming - SHA256 checksums - GitHub releases with auto-generated changelog - Version tagged as v{{.Version}} GoReleaser will automatically create GitHub releases when tags are pushed. --- .goreleaser.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..31e2a67 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: MIT +# Copyright (c) 2026 Paul Buetow + +version: 2 + +before: + hooks: + - go mod tidy + +builds: + - main: ./cmd/gt + binary: gt + ldflags: + - -s -w + - -X main.version={{.Version}} + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + env: + - CGO_ENABLED=0 + +archives: + - format: tar.gz + name_template: >- + {{ .ProjectName }}_ + {{ .Version }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "arm64" }}aarch64 + {{- else }}{{ .Arch }}{{ end }} + format_overrides: + - goos: windows + format: zip + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + - "^ci:" + +release: + github: + owner: snonux + name: gt + draft: false + prerelease: false + mode: replace + name_template: "v{{ .Version }}" + +checksum: + name_template: "checksums.txt" + algorithm: sha256 + + Announce: + enable: false -- cgit v1.2.3