From 0a7df4ef26ce68a944166d52203a1cbcaf9b33a4 Mon Sep 17 00:00:00 2001 From: houseme Date: Mon, 21 Jul 2025 19:03:15 +0800 Subject: [PATCH] fix --- .github/workflows/build.yml | 54 +++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a15763a..66917c3e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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