deploy workflow: version stamp from git describe
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
09772c7871
commit
cdd0ad3215
1 file changed
+3
-1
@@ -30,6 +30,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: cmd/rollcall/go.mod
|
||||
@@ -37,7 +39,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
working-directory: cmd/rollcall
|
||||
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o ../../deploy/rollcall .
|
||||
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=$(git describe --tags --always --dirty)" -o ../../deploy/rollcall .
|
||||
|
||||
- name: SSH setup
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user