mirror of
https://github.com/fankes/komari-agent.git
synced 2025-10-19 02:59:23 +08:00
feat: 添加对Darwin和FreeBSD的GPU及操作系统名称获取功能
This commit is contained in:
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build and Attach Binaries to Release
|
||||
name: Release Binaries
|
||||
|
||||
on:
|
||||
release:
|
||||
@@ -13,8 +13,15 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [windows, linux]
|
||||
goarch: [amd64, arm64]
|
||||
exclude:
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
- goos: darwin
|
||||
goarch: 386
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
goos: [windows, linux, darwin, freebsd]
|
||||
goarch: [amd64, arm64, 386, arm]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -35,6 +42,9 @@ jobs:
|
||||
BINARY_NAME=komari-agent-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
||||
BINARY_NAME=${BINARY_NAME}.exe
|
||||
elif [ "${{ matrix.goos }}" = "darwin" ]; then
|
||||
# macOS binaries typically do not have a file extension
|
||||
true
|
||||
fi
|
||||
go build -trimpath -ldflags="-s -w -X github.com/komari-monitor/komari-agent/update.CurrentVersion=${VERSION}" -o $BINARY_NAME
|
||||
|
||||
@@ -45,6 +55,8 @@ jobs:
|
||||
BINARY_NAME=komari-agent-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
||||
BINARY_NAME=${BINARY_NAME}.exe
|
||||
elif [ "${{ matrix.goos }}" = "darwin" ]; then
|
||||
true
|
||||
fi
|
||||
gh release upload ${{ github.event.release.tag_name }} $BINARY_NAME --repo ${{ github.repository }}
|
||||
shell: bash
|
||||
|
Reference in New Issue
Block a user