ci: 添加二进制压缩步骤
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-08 17:11:56 +08:00
committed by cnb
parent 8bc6802251
commit 4c98cdf543

View File

@@ -89,6 +89,9 @@ steps:
-ldflags "-s -w -buildid= -extldflags '-static'" \ -ldflags "-s -w -buildid= -extldflags '-static'" \
-o ./build/$BIN_NAME \ -o ./build/$BIN_NAME \
./login ./login
- |
strip ./build/$BIN_NAME
upx --best --lzma ./build/$BIN_NAME
- | - |
if [ ! -f ./build/$BIN_NAME ]; then if [ ! -f ./build/$BIN_NAME ]; then
echo "❌ 编译失败:产物$BIN_NAME不存在" echo "❌ 编译失败:产物$BIN_NAME不存在"
@@ -105,6 +108,9 @@ steps:
-ldflags "-s -w -buildid= -extldflags '-static'" \ -ldflags "-s -w -buildid= -extldflags '-static'" \
-o ./build/$BIN_NAME \ -o ./build/$BIN_NAME \
./logic ./logic
- |
strip ./build/$BIN_NAME
upx --best --lzma ./build/$BIN_NAME
- | - |
if [ ! -f ./build/$BIN_NAME ]; then if [ ! -f ./build/$BIN_NAME ]; then
echo "❌ 编译失败:产物$BIN_NAME不存在" echo "❌ 编译失败:产物$BIN_NAME不存在"