This commit is contained in:
houseme
2025-07-21 19:03:15 +08:00
parent 9dcdc44718
commit 0a7df4ef26

View File

@@ -172,14 +172,14 @@ jobs:
target: aarch64-unknown-linux-musl
cross: true
platform: linux
# - os: ubuntu-latest
# target: x86_64-unknown-linux-gnu
# cross: false
# platform: linux
# - os: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# cross: true
# platform: linux
#- os: ubuntu-latest
# target: x86_64-unknown-linux-gnu
# cross: false
# platform: linux
#- os: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# cross: true
# platform: linux
# macOS builds
- os: macos-latest
target: aarch64-apple-darwin
@@ -194,10 +194,10 @@ jobs:
target: x86_64-pc-windows-msvc
cross: false
platform: windows
- os: windows-latest
target: aarch64-pc-windows-msvc
cross: true
platform: windows
#- os: windows-latest
# target: aarch64-pc-windows-msvc
# cross: true
# platform: windows
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -303,10 +303,36 @@ jobs:
sudo apt-get update && sudo apt-get install -y zip
fi
fi
cd target/${{ matrix.target }}/release
zip "../../../${PACKAGE_NAME}.zip" rustfs
# Determine the binary name based on platform
if [[ "${{ matrix.platform }}" == "windows" ]]; then
BINARY_NAME="rustfs.exe"
else
BINARY_NAME="rustfs"
fi
# Verify the binary exists before packaging
if [[ ! -f "$BINARY_NAME" ]]; then
echo "❌ Binary $BINARY_NAME not found in $(pwd)"
ls -la
exit 1
fi
# Create the zip package
zip "../../../${PACKAGE_NAME}.zip" "$BINARY_NAME"
cd ../../..
# Verify the package was created
if [[ -f "${PACKAGE_NAME}.zip" ]]; then
echo "✅ Package created successfully: ${PACKAGE_NAME}.zip"
echo "📦 Package size: $(ls -lh ${PACKAGE_NAME}.zip | awk '{print $5}')"
else
echo "❌ Failed to create package: ${PACKAGE_NAME}.zip"
exit 1
fi
echo "package_name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
echo "package_file=${PACKAGE_NAME}.zip" >> $GITHUB_OUTPUT