diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-25 17:08:48 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-25 17:08:48 +0200 |
| commit | 28a80067cbbb2be1d9828a5d8dbaaab3b4b87bd3 (patch) | |
| tree | c80a832b08363faaf6d09c86fb2718eddda23f51 | |
| parent | 419908214cc2777bdcade3155bd52085412eeb81 (diff) | |
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.
| -rw-r--r-- | .goreleaser.yml | 61 |
1 files changed, 61 insertions, 0 deletions
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 |
