Update workflows and build process for enhanced metadata injection

- Upgraded GitHub Actions (`actions/checkout` to v4, `actions/setup-go` to v4, `goreleaser-action` to v4).
- Added detailed build metadata (`VERSION`, `COMMIT`, `BUILD_DATE`) to workflows.
- Unified metadata injection into binaries and Docker images.
- Enhanced `.goreleaser.yml` with checksum, snapshot, and changelog configurations.
This commit is contained in:
Luis Pater
2025-09-06 15:37:48 +08:00
parent d10ef7b58a
commit ef922b29c2
3 changed files with 35 additions and 15 deletions

View File

@@ -10,10 +10,7 @@ builds:
main: ./cmd/server/
binary: cli-proxy-api
ldflags:
- -s -w
- -X 'main.Version={{.Version}}'
- -X 'main.Commit={{.ShortCommit}}'
- -X 'main.BuildDate={{.Date}}'
- -s -w -X 'main.Version={{.Version}}' -X 'main.Commit={{.ShortCommit}}' -X 'main.BuildDate={{.Date}}'
archives:
- id: "cli-proxy-api"
format: tar.gz
@@ -24,4 +21,17 @@ archives:
- LICENSE
- README.md
- README_CN.md
- config.example.yaml
- config.example.yaml
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'