chore: update goreleaser config to v2 format

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
JiXieShi
2026-05-24 04:17:25 +08:00
parent ab9d4a0f82
commit 4f6d1b7b25
+2 -29
View File
@@ -1,20 +1,4 @@
#file: noinspection YAMLSchemaValidation version: 2
# 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: builds:
- main: ./cmd/serialterminal - main: ./cmd/serialterminal
@@ -27,16 +11,8 @@ builds:
ldflags: ldflags:
- -s -w - -s -w
upx:
- enabled: true
goos:
- windows
goarch:
- amd64
archives: archives:
- format: tar.gz - format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >- name_template: >-
{{ .ProjectName }}_ {{ .ProjectName }}_
{{- title .Os }}_ {{- title .Os }}_
@@ -44,16 +20,13 @@ archives:
{{- else if eq .Arch "386" }}i386 {{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }} {{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }} {{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides: format_overrides:
- goos: windows - goos: windows
format: zip format: zip
checksum: checksum:
name_template: 'checksums.txt' name_template: 'checksums.txt'
snapshot:
name_template: 'v1.0.0-snapshot'
changelog: changelog:
sort: asc sort: asc
filters: filters: