Skip to content

Commit 8fcb4bb

Browse files
committed
ci: set goreleaser ldflaps for github actions
1 parent e02f819 commit 8fcb4bb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
- pull_request
44
- push
55
permissions:
6+
contents: write
67
packages: write
78
jobs:
89
test:
@@ -142,6 +143,7 @@ jobs:
142143
uses: goreleaser/goreleaser-action@v4
143144
with:
144145
version: latest
145-
args: release --rm-dist
146+
args: release --clean
146147
env:
148+
GIT_REPO: ${{ steps.docker.outputs.gitRepo }}
147149
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ builds:
1313
- linux
1414
- windows
1515
- darwin
16+
ldflags:
17+
- -w -s -X {{ .Env.GIT_REPO }}/cmd.Version={{ .Version }} -X {{ .Env.GIT_REPO }}/cmd.GitCommit={{ .Commit }}
1618
archives:
1719
- replacements:
1820
darwin: Darwin

0 commit comments

Comments
 (0)