Update release.yml

This commit is contained in:
Akizon
2025-05-03 21:20:01 +08:00
committed by GitHub
parent ab9c81cb14
commit 8a1041fda3

View File

@@ -30,12 +30,13 @@ jobs:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
VERSION: ${{ github.event.release.tag_name }}
run: |
BINARY_NAME=komari-agent-${{ matrix.goos }}-${{ matrix.goarch }}
if [ "${{ matrix.goos }}" = "windows" ]; then
BINARY_NAME=${BINARY_NAME}.exe
fi
go build -trimpath -ldflags="-s -w" -o $BINARY_NAME
go build -trimpath -ldflags="-s -w -X main.CurrentVersion=${VERSION}" -o $BINARY_NAME
- name: Upload binary to release
env:
@@ -46,4 +47,4 @@ jobs:
BINARY_NAME=${BINARY_NAME}.exe
fi
gh release upload ${{ github.event.release.tag_name }} $BINARY_NAME --repo ${{ github.repository }}
shell: bash
shell: bash