mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
Add versioning support to build artifacts and log outputs
- Introduced `Version` variable, set during build via `-ldflags`, to embed application version. - Updated Dockerfile to accept `APP_VERSION` argument for version injection during build. - Modified `.goreleaser.yml` to pass GitHub release tag as version via `ldflags`. - Added version logging in the application startup.
This commit is contained in:
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -21,6 +21,8 @@ jobs:
|
||||
with:
|
||||
go-version: '>=1.24.0'
|
||||
cache: true
|
||||
- name: "Set custom GORELEASER_CURRENT_TAG"
|
||||
run: echo "GORELEASER_CURRENT_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
|
||||
- uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
distribution: goreleaser
|
||||
|
||||
Reference in New Issue
Block a user