build: enhance build process and release configuration

- Add build flags and ldflags for Go builds
- Add Gitea URLs and force token configuration for release

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy
2025-04-08 21:39:21 +08:00
parent 6993bb2b5d
commit d0225c4c24

View File

@@ -14,6 +14,11 @@ builds:
- linux - linux
- windows - windows
- darwin - darwin
flags:
- -trimpath
ldflags:
- -s -w
- -X main.version={{.Version}}
archives: archives:
- formats: tar.gz - formats: tar.gz
@@ -64,3 +69,8 @@ release:
--- ---
Released by [GoReleaser](https://github.com/goreleaser/goreleaser). Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
gitea_urls:
api: https://gitea.com/api/v1
download: https://gitea.com
force_token: gitea