统一 musl 全静态构建,规范 Dockerfile 与产物命名
Build and Release / release (push) Successful in 12s
Build and Release / build-and-test (amd64) (push) Successful in 1m27s
Build and Release / build-and-test (arm64) (push) Successful in 4m5s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 10:12:08 +08:00
co-authored by Claude Opus 4.8
parent 69a9404a97
commit 491c9e0bc3
8 changed files with 21 additions and 107 deletions
+5 -7
View File
@@ -18,7 +18,6 @@ jobs:
strategy:
matrix:
arch: [amd64, arm64]
distro: [ubuntu, alpine]
steps:
- uses: actions/checkout@v4
@@ -39,7 +38,7 @@ jobs:
PLATFORM="linux/${{ matrix.arch }}"
echo "🏗️ Building ${PLATFORM} on native ${{ matrix.arch }} runner"
echo "📦 Distribution: ${{ matrix.distro }}"
echo "📦 Build: musl 全静态 (docker/Dockerfile, 基于 alpine)"
# 设置 BuildKit 优化参数
export BUILDKIT_PROGRESS=plain
@@ -48,7 +47,7 @@ jobs:
--platform ${PLATFORM} \
--build-arg XXXIG_VERSION=${XXXIG_VERSION} \
--output type=local,dest=./output \
-f docker/Dockerfile.${{ matrix.distro }} .
-f docker/Dockerfile .
- name: Package and test
run: |
@@ -59,7 +58,7 @@ jobs:
exit 1
fi
TARGZ="${PRODUCT_NAME}-${{ matrix.arch }}-${{ matrix.distro }}-${PACKAGE_VERSION}.tar.gz"
TARGZ="${PRODUCT_NAME}-${{ matrix.arch }}-linux-static-${PACKAGE_VERSION}.tar.gz"
tar -czf "${TARGZ}" -C "$DIR" .
echo "📦 Created package: ${TARGZ}"
@@ -71,12 +70,11 @@ jobs:
rm -rf test
- name: Build Debian package
if: matrix.distro == 'ubuntu'
run: |
# 安装 dpkg-deb(如果需要)
sudo apt-get update && sudo apt-get install -y dpkg-dev
TARGZ="${PRODUCT_NAME}-${{ matrix.arch }}-${{ matrix.distro }}-${PACKAGE_VERSION}.tar.gz"
TARGZ="${PRODUCT_NAME}-${{ matrix.arch }}-linux-static-${PACKAGE_VERSION}.tar.gz"
echo "📦 Building Debian package for ${{ matrix.arch }}..."
chmod +x debian/build-deb.sh
@@ -86,7 +84,7 @@ jobs:
- uses: https://github.com/ChristopherHX/gitea-upload-artifact@v4
with:
name: binaries-${{ matrix.arch }}-${{ matrix.distro }}
name: binaries-${{ matrix.arch }}
path: |
*.tar.gz
*.deb