feat: goreleaser proper handle ldflags

This commit is contained in:
Simon Ding
2025-09-01 00:12:35 +08:00
parent d15f04e69c
commit dea4ecb9d4
2 changed files with 3 additions and 0 deletions

View File

@@ -46,5 +46,6 @@ jobs:
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

View File

@@ -24,6 +24,8 @@ builds:
- darwin
- freebsd
main: ./cmd/polaris
ldflags:
- -X polaris/db.Version=$(git describe --tags --long) -X polaris/db.DefaultTmdbApiKey=$(echo $TMDB_API_KEY)
goarch:
- amd64
- arm64