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:
@@ -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:'
|
||||
Reference in New Issue
Block a user