From fa6c73d1de6fe86586cca34dfd50052b59ea89eb Mon Sep 17 00:00:00 2001 From: Mulia Nasution Date: Fri, 19 Apr 2024 12:20:13 +0700 Subject: [PATCH] feat: get version based on tags --- .github/workflows/release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9a47a474..c4b7b102 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,6 +30,10 @@ jobs: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} run: | + VERSION=$GITHUB_REF_NAME||$GITHUB_HEAD_REF + echo "Raiden version: $VERSION" + sed "s/.*appVersion = \".*\"$/\tappVersion = \"$VERSION\"/" 'cmd/raiden/commands/version.go' + go build -ldflags="-s -w" -trimpath -o build/raiden ./cmd/raiden/main.go cd build if [[ $GOOS == 'darwin' ]]; then