fix: 优化构建二进制文件的命令,减少生成的文件大小

This commit is contained in:
Akizon77
2025-04-29 21:15:54 +08:00
parent 07b2eef610
commit 5f882d7042

View File

@@ -29,12 +29,13 @@ jobs:
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
BINARY_NAME=komari-agent-${{ matrix.goos }}-${{ matrix.goarch }}
if [ "${{ matrix.goos }}" = "windows" ]; then
BINARY_NAME=${BINARY_NAME}.exe
fi
go build -o $BINARY_NAME
go build -trimpath -ldflags="-s -w" -o $BINARY_NAME
- name: Upload binary to release
env: