mirror of
https://github.com/fankes/komari-agent.git
synced 2025-10-19 02:59: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 }}
|
GOOS: ${{ matrix.goos }}
|
||||||
GOARCH: ${{ matrix.goarch }}
|
GOARCH: ${{ matrix.goarch }}
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
VERSION: ${{ github.event.release.tag_name }}
|
||||||
run: |
|
run: |
|
||||||
BINARY_NAME=komari-agent-${{ matrix.goos }}-${{ matrix.goarch }}
|
BINARY_NAME=komari-agent-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
if [ "${{ matrix.goos }}" = "windows" ]; then
|
||||||
BINARY_NAME=${BINARY_NAME}.exe
|
BINARY_NAME=${BINARY_NAME}.exe
|
||||||
fi
|
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
|
- name: Upload binary to release
|
||||||
env:
|
env:
|
||||||
@@ -46,4 +47,4 @@ jobs:
|
|||||||
BINARY_NAME=${BINARY_NAME}.exe
|
BINARY_NAME=${BINARY_NAME}.exe
|
||||||
fi
|
fi
|
||||||
gh release upload ${{ github.event.release.tag_name }} $BINARY_NAME --repo ${{ github.repository }}
|
gh release upload ${{ github.event.release.tag_name }} $BINARY_NAME --repo ${{ github.repository }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Reference in New Issue
Block a user