From 4d6423a64180b0b1de6cf22b3d79d77e46e971db Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sat, 10 Jan 2026 00:48:20 +0100 Subject: [PATCH] fix: resolve checksums generation failure in release workflow - Upload all binaries to single 'binaries' artifact instead of separate artifacts - Remove complex directory flattening logic that was causing mv errors - Add better error handling and debugging output for checksum generation - Simplify artifact download process Fixes the 'mv: cannot overwrite directory' errors that were causing the Generate Checksums step to fail during release builds. --- .github/workflows/release.yml | 40 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3cedbb6..35e6a14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -148,7 +148,7 @@ jobs: - name: Upload build artifact uses: actions/upload-artifact@v6 with: - name: ${{ steps.build.outputs.binary_name }} + name: binaries path: ${{ steps.build.outputs.binary_name }} retention-days: 1 @@ -161,39 +161,43 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v7 with: + name: binaries path: ./binaries - name: Generate checksums run: | cd binaries - # Flatten directory structure (artifacts are in subdirs) - find . -name "soundtouch-cli-*" -exec mv {} . \; - - # Remove empty directories - find . -type d -empty -delete + # Debug: Show the downloaded structure + echo "📁 Downloaded artifact structure:" + ls -la # Generate SHA256 checksums - sha256sum soundtouch-cli-* > checksums.sha256 + if ls soundtouch-cli-* 1> /dev/null 2>&1; then + sha256sum soundtouch-cli-* > checksums.sha256 + sha512sum soundtouch-cli-* > checksums.sha512 - # Generate SHA512 checksums - sha512sum soundtouch-cli-* > checksums.sha512 + echo "📋 Generated checksums:" + cat checksums.sha256 - echo "📋 Generated checksums:" - cat checksums.sha256 + # Verify all expected files are present + EXPECTED_COUNT=7 # Based on build matrix + ACTUAL_COUNT=$(ls soundtouch-cli-* | wc -l) - # Verify all expected files are present - EXPECTED_COUNT=7 # Based on build matrix - ACTUAL_COUNT=$(ls soundtouch-cli-* | wc -l) + if [[ $ACTUAL_COUNT -ne $EXPECTED_COUNT ]]; then + echo "❌ Expected $EXPECTED_COUNT binaries, found $ACTUAL_COUNT" + ls -la + exit 1 + fi - if [[ $ACTUAL_COUNT -ne $EXPECTED_COUNT ]]; then - echo "❌ Expected $EXPECTED_COUNT binaries, found $ACTUAL_COUNT" + echo "✅ All $ACTUAL_COUNT binaries present" + else + echo "❌ No binary files found" + echo "Directory contents:" ls -la exit 1 fi - echo "✅ All $ACTUAL_COUNT binaries present" - - name: Upload checksums uses: actions/upload-artifact@v6 with: