From 17a3c0bbfeda885148c88d97461e6fb17981a5ec Mon Sep 17 00:00:00 2001 From: Arne Baier Date: Fri, 19 Jun 2026 20:40:17 +0200 Subject: [PATCH] build chain dev --- .github/workflows/.goreleaser.yaml | 51 ++++++++++++++++++++++++++++++ .goreleaser.yaml | 37 ---------------------- 2 files changed, 51 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/.goreleaser.yaml delete mode 100644 .goreleaser.yaml diff --git a/.github/workflows/.goreleaser.yaml b/.github/workflows/.goreleaser.yaml new file mode 100644 index 0000000..d244e68 --- /dev/null +++ b/.github/workflows/.goreleaser.yaml @@ -0,0 +1,51 @@ +# .goreleaser.yaml +# Complete build and release automation configuration for hamlib_rest_api + +version: 2 + +# Global environment variables before building +env: + - CGO_ENABLED=0 + +# Define the build targets +builds: + - id: "hamlib-rest-api" + main: ./main.go + binary: hamlib-rest-api + + # Target operating systems and architectures + goos: + - linux + goarch: + - amd64 + - arm64 + + # Optimization flags (strips debug symbols to reduce binary size) + ldflags: + - -s -w + +# Define how the binaries are packed into archives (.tar.gz) +archives: + - id: "hamlib-rest-api-archive" + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + format: tar.gz + + # Files to include in the release archive along with the binary + files: + - README.md + - ToDos.md + - rigctld.json + - rigctld@.service + +# Generates a checksums.txt so downloaders (or tools) can verify file integrity +checksum: + name_template: 'checksums.txt' + +# Configuration for the automatic changelog generation +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^typo' + - 'Merge pull request' \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml deleted file mode 100644 index be4b38d..0000000 --- a/.goreleaser.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# .goreleaser.yaml -version: 2 -before: - hooks: - - go mod tidy -builds: - - env: - - CGO_ENABLED=0 - goos: - - linux -# - windows -# - darwin # macOS - goarch: - - amd64 - - arm64 - binary: hamlib-rest-api - flags: - - -tags=netgo - ldflags: - - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} - -archives: - - format: tar.gz - # Verwende für Windows lieber .zip statt .tar.gz - format_overrides: - - goos: windows - format: zip - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" - -checksum: - name_template: "checksums.txt" -changelog: - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" \ No newline at end of file