Skip to content

Commit b0a184b

Browse files
committed
ci(release): use ldflags instead of build command
1 parent 46dff7c commit b0a184b

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
matrix:
4040
# build and publish in parallel: linux/amd64, linux/arm64, windows/amd64, darwin/amd64, darwin/arm64
41-
goos: [linux]
41+
goos: [linux, windows, darwin]
4242
goarch: [amd64, arm64]
4343
exclude:
4444
- goarch: arm64
@@ -51,13 +51,7 @@ jobs:
5151
github_token: ${{ secrets.GITHUB_TOKEN }}
5252
goos: ${{ matrix.goos }}
5353
goarch: ${{ matrix.goarch }}
54-
project_path: "."
55-
build_command: |
56-
if test -z "$TAG"
57-
then TAG="$(git describe --tags --abbrev=0 2>/dev/null || git rev-parse --short HEAD)"
58-
fi
59-
echo "Building $TAG"
60-
go build -ldflags "-X main.CLIVersion=$TAG" "$@"
61-
54+
ldflags: "-X main.CLIVersion=${{github.ref_name}}"
55+
project_path: "./cmd/fl"
6256
binary_name: "fl"
6357
extra_files: LICENSE README.md

0 commit comments

Comments
 (0)