更新构建流程,调整输出目录结构以支持多种操作系统,优化 Go 二进制构建步骤

This commit is contained in:
2025-06-11 03:34:35 +08:00
parent 7176a4a5fd
commit 51a3b09aad

View File

@ -31,6 +31,7 @@ permissions:
jobs: jobs:
frontend: frontend:
name: Build Frontend
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
@ -172,11 +173,18 @@ jobs:
GOARM: ${{ matrix.goarm }} GOARM: ${{ matrix.goarm }}
GO386: ${{ matrix.go386 }} GO386: ${{ matrix.go386 }}
run: | run: |
OUTDIR=${{ env.BIN_OUT }}/${{ matrix.goos }}-${{ matrix.output }} OUTDIR=${{ env.BIN_OUT }}/linux-${{ matrix.output }}
mkdir -p $OUTDIR
OUTNAME=${{ env.BIN_NAME }}
if [ "${{ matrix.goos }}" = "windows" ]; then if [ "${{ matrix.goos }}" = "windows" ]; then
OUTNAME=${{ env.BIN_NAME }}.exe OUTDIR=${{ env.BIN_OUT }}/windows-${{ matrix.output }}
elif [ "${{ matrix.goos }}" = "darwin" ]; then
OUTDIR=${{ env.BIN_OUT }}/darwin-${{ matrix.output }}
elif [ "${{ matrix.goos }}" = "freebsd" ]; then
OUTDIR=${{ env.BIN_OUT }}/freebsd-${{ matrix.output }}
fi
mkdir -p $OUTDIR
OUTNAME=spage
if [ "${{ matrix.goos }}" = "windows" ]; then
OUTNAME=spage.exe
fi fi
go build \ go build \
-trimpath \ -trimpath \