Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

update goreleaser

aichya43224ec8576
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 42d62f49..bec98c98 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -1,20 +1,45 @@
-# This is an example .goreleaser.yml file with some sensible defaults.
-# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
- # You may remove this if you don't use go modules.
- go mod tidy
builds:
- - env:
- - CGO_ENABLED=1
+ - id: build-linux
+ main: ./cmd/answer/.
+ binary: PrometheusAlert
+ ldflags: -s -w -X main.Version=${{.Version}} -X main.Revision={{.ShortCommit}} -X main.BuildDate={{.Date}} -X main.BuildUser=goreleaser
+ goos:
+ - darwin
+ - linux
+ goarch:
+ - amd64
+ # linux windows need cgomingw64-gcc
+ - id: build-windows
+ main: ./cmd/answer/.
+ binary: PrometheusAlert
+ ldflags: -s -w -X main.Version=${{.Version}} -X main.Revision={{.ShortCommit}} -X main.BuildDate={{.Date}} -X main.BuildUser=goreleaser
+ env:
+ - CC=x86_64-w64-mingw32-gcc
+ - CXX=x86_64-w64-mingw32-g++
+ goos:
+ - windows
+ goarch:
+ - amd64
+ # linux arm64 need cgo arm64
+ - id: build-arm
+ main: ./cmd/answer/.
+ binary: PrometheusAlert
+ ldflags: -s -w -X main.Version=${{.Version}} -X main.Revision={{.ShortCommit}} -X main.BuildDate={{.Date}} -X main.BuildUser=goreleaser
+ env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- main: ./cmd/answer/.
goos:
+ - darwin
- linux
+ goarch:
+ - arm64
+
archives:
- replacements:
- linux: Linux
+ darwin: Darwin
amd64: x86_64
checksum:
name_template: 'checksums.txt'
@@ -25,14 +50,4 @@ changelog:
filters:
exclude:
- '^docs:'
- - '^test:'
-
-# modelines, feel free to remove those if you don't want/use them:
-# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
-# vim: set ts=2 sw=2 tw=0 fo=cnqoj
-# sqlite3 need cgo to build
-# sudo apt-get install build-essential
-# sudo apt-get install gcc-multilib g++-multilib
-# sudo apt-get install gcc-mingw-w64
-# sudo apt-get -y install gcc-aarch64-linux-gnu
-# goreleaser release --snapshot --rm-dist
+ - '^test:'
\ No newline at end of file