From 4526e00d797526cfc842d14824352af05c3df25f Mon Sep 17 00:00:00 2001 From: Ink33 Date: Sat, 27 Mar 2021 17:17:05 +0800 Subject: [PATCH] update .goreleaser.yml (cherry picked from commit eb8a65c6825f025b1e6406767e5d64c3db604d7c) add maintainer (cherry picked from commit a5947ece10ba60795f349c4a0a6f6f08fbea0a33) --- .goreleaser.yml | 49 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index e9a9a5a..06e2ad7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -4,13 +4,13 @@ before: hooks: - go mod tidy builds: - - env: + - id: nowin + env: - CGO_ENABLED=0 - GO111MODULE=on goos: - linux - darwin - - windows goarch: - 386 - amd64 @@ -21,22 +21,37 @@ builds: goarch: arm - goos: darwin goarch: 386 - - goos: windows - goarch: arm64 - mod_timestamp: '{{ .CommitTimestamp }}' + mod_timestamp: "{{ .CommitTimestamp }}" + flags: + - -trimpath + ldflags: + - -s -w -X github.com/Mrs4s/go-cqhttp/coolq.Version=v{{.Version}} + - id: win + env: + - CGO_ENABLED=0 + - GO111MODULE=on + goos: + - windows + goarch: + - 386 + - amd64 + - arm + goarm: + - 7 + mod_timestamp: "{{ .CommitTimestamp }}" flags: - -trimpath ldflags: - -s -w -X github.com/Mrs4s/go-cqhttp/coolq.Version=v{{.Version}} checksum: - name_template: '{{ .ProjectName }}_checksums.txt' + name_template: "{{ .ProjectName }}_checksums.txt" changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' + - "^docs:" + - "^test:" - fix typo - Merge pull request - Merge branch @@ -44,7 +59,18 @@ changelog: - go mod tidy archives: - - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + - id: binary + builds: + - win + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + format_overrides: + - goos: windows + format: binary + - id: nowin + builds: + - nowin + - win + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" format_overrides: - goos: windows format: zip @@ -52,7 +78,8 @@ archives: nfpms: - license: AGPL 3.0 homepage: https://go-cqhttp.org - file_name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" + file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" formats: - deb - - rpm \ No newline at end of file + - rpm + maintainer: Mrs4s