From 4f6d1b7b252e0a41ea86c9ee78c720dd72099ca3 Mon Sep 17 00:00:00 2001 From: JiXieShi Date: Sun, 24 May 2026 04:17:25 +0800 Subject: [PATCH] chore: update goreleaser config to v2 format Co-Authored-By: Claude Opus 4.7 --- .goreleaser.yaml | 97 +++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 62 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c891360..18ae5e9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,62 +1,35 @@ -#file: noinspection YAMLSchemaValidation -# This is an example .goreleaser.yml file with some sensible defaults. -# Make sure to check the documentation at https://goreleaser.com - -# The lines below are called `modelines`. See `:help modeline` -# Feel free to remove those if you don't want/need to use them. -# yaml-language-server: $schema=https://goreleaser.com/static/schema.json -# vim: set ts=2 sw=2 tw=0 fo=cnqoj - -version: 1 - -before: - hooks: - # You may remove this if you don't use go modules. -# - go mod tidy - # you may remove this if you don't need go generate -# - go generate ./... - -builds: - - main: ./cmd/serialterminal - env: - - CGO_ENABLED=0 - goos: - - linux - - windows - - darwin - ldflags: - - -s -w - -upx: - - enabled: true - goos: - - windows - goarch: - - amd64 - -archives: - - format: tar.gz - # this name template makes the OS and Arch compatible with the results of `uname`. - name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }} - {{- if .Arm }}v{{ .Arm }}{{ end }} - # use zip for windows archives - format_overrides: - - goos: windows - format: zip -checksum: - name_template: 'checksums.txt' - -snapshot: - name_template: 'v1.0.0-snapshot' - -changelog: - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" +version: 2 + +builds: + - main: ./cmd/serialterminal + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + ldflags: + - -s -w + +archives: + - format: tar.gz + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + format_overrides: + - goos: windows + format: zip + +checksum: + name_template: 'checksums.txt' + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:"