mirror of
https://github.com/fankes/komari-agent.git
synced 2025-10-18 18:49:23 +08:00
Update release.yml
This commit is contained in:
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user