Skip to content

Commit 7255c26

Browse files
doublegateclaude
andcommitted
fix(ci): fix macOS bundle and separate Linux AppImages
- Fix jq installation warning on macOS by checking if already installed - Fix macOS DMG collection to handle spaces in filenames properly (use find -print0 with while loop instead of -exec cp) - Separate Linux AppImages as individual downloadable artifacts (no longer bundled in tar.gz archive) - Linux bundle now contains only .deb and .rpm packages - Update release summary to reflect AppImage separation - Add checksums for individual AppImages to SHA256SUMS-clients.txt Fixes: - macOS bundle was 4.5MB instead of expected ~100MB+ because DMG files with spaces in names weren't being copied - AppImages should be separate downloads for easy installation - jq warning was appearing in macOS build logs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5156348 commit 7255c26

File tree

1 file changed

+102
-30
lines changed

1 file changed

+102
-30
lines changed

.github/workflows/release.yml

Lines changed: 102 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,10 @@ jobs:
390390
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
391391
sudo apt-get install -y jq
392392
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
393-
brew install jq
393+
# Check if jq is already installed to avoid brew warning
394+
if ! command -v jq &> /dev/null; then
395+
brew install jq
396+
fi
394397
fi
395398
shell: bash
396399

@@ -573,20 +576,28 @@ jobs:
573576
BUNDLE_NAME="wraith-clients-${VERSION_NO_V}-linux-${ARCH}"
574577
575578
mkdir -p "bundle-staging/$BUNDLE_NAME"
579+
mkdir -p "appimage-staging"
576580
577581
# Collect all client artifacts
578582
if [ -d "target/release/bundle" ]; then
579-
# AppImages
580-
find target/release/bundle -type f -name "*.AppImage" \
581-
-exec cp {} "bundle-staging/$BUNDLE_NAME/" \; 2>/dev/null || true
582-
583-
# Debian packages
584-
find target/release/bundle -type f -name "*.deb" \
585-
-exec cp {} "bundle-staging/$BUNDLE_NAME/" \; 2>/dev/null || true
586-
587-
# RPM packages (if any)
588-
find target/release/bundle -type f -name "*.rpm" \
589-
-exec cp {} "bundle-staging/$BUNDLE_NAME/" \; 2>/dev/null || true
583+
# AppImages - collect separately for individual upload
584+
while IFS= read -r -d '' file; do
585+
# Copy to separate staging for individual upload
586+
cp "$file" "appimage-staging/"
587+
echo "Found AppImage: $(basename "$file")"
588+
done < <(find target/release/bundle -type f -name "*.AppImage" -print0 2>/dev/null)
589+
590+
# Debian packages - include in bundle
591+
while IFS= read -r -d '' file; do
592+
cp "$file" "bundle-staging/$BUNDLE_NAME/"
593+
echo "Found DEB: $(basename "$file")"
594+
done < <(find target/release/bundle -type f -name "*.deb" -print0 2>/dev/null)
595+
596+
# RPM packages - include in bundle
597+
while IFS= read -r -d '' file; do
598+
cp "$file" "bundle-staging/$BUNDLE_NAME/"
599+
echo "Found RPM: $(basename "$file")"
600+
done < <(find target/release/bundle -type f -name "*.rpm" -print0 2>/dev/null)
590601
fi
591602
592603
# Create README for the bundle
@@ -595,20 +606,22 @@ jobs:
595606
Version: ${VERSION}
596607
Platform: Linux ${ARCH}
597608
609+
This bundle contains .deb and .rpm packages.
610+
AppImages are available as separate downloads.
611+
598612
Installation:
599-
- AppImage: chmod +x *.AppImage && ./*.AppImage
600613
- Debian/Ubuntu: sudo dpkg -i *.deb
601614
- Fedora/RHEL: sudo rpm -i *.rpm
602615
603616
For more information: https://github.com/doublegate/WRAITH-Protocol
604617
EOF
605618
606-
# Generate checksums
619+
# Generate checksums for bundle
607620
cd "bundle-staging/$BUNDLE_NAME"
608621
sha256sum * > SHA256SUMS.txt 2>/dev/null || true
609622
cd ../..
610623
611-
# Create the bundle archive
624+
# Create the bundle archive (deb + rpm only)
612625
mkdir -p client-bundle
613626
cd bundle-staging
614627
tar czf "../client-bundle/${BUNDLE_NAME}.tar.gz" "$BUNDLE_NAME"
@@ -619,9 +632,14 @@ jobs:
619632
sha256sum "${BUNDLE_NAME}.tar.gz" > "${BUNDLE_NAME}.tar.gz.sha256"
620633
cd ..
621634
622-
echo "Linux bundle created:"
635+
echo ""
636+
echo "Linux bundle created (deb + rpm):"
623637
ls -lh client-bundle/
624638
639+
echo ""
640+
echo "AppImages staged for separate upload:"
641+
ls -lh appimage-staging/ 2>/dev/null || echo "No AppImages found"
642+
625643
- name: Collect and bundle macOS artifacts
626644
if: matrix.os == 'macos-latest'
627645
env:
@@ -633,12 +651,23 @@ jobs:
633651
634652
mkdir -p "bundle-staging/$BUNDLE_NAME"
635653
636-
# Collect all DMG files
654+
# Collect all DMG files - use while loop for proper handling of spaces in filenames
637655
if [ -d "target/release/bundle" ]; then
638-
find target/release/bundle -type f -name "*.dmg" \
639-
-exec cp {} "bundle-staging/$BUNDLE_NAME/" \; 2>/dev/null || true
656+
DMG_COUNT=0
657+
while IFS= read -r -d '' file; do
658+
cp "$file" "bundle-staging/$BUNDLE_NAME/"
659+
echo "Found DMG: $(basename "$file")"
660+
DMG_COUNT=$((DMG_COUNT + 1))
661+
done < <(find target/release/bundle -type f -name "*.dmg" -print0 2>/dev/null)
662+
663+
echo "Total DMGs found: $DMG_COUNT"
640664
fi
641665
666+
# List what was collected
667+
echo ""
668+
echo "Contents of bundle-staging/$BUNDLE_NAME:"
669+
ls -la "bundle-staging/$BUNDLE_NAME/" || true
670+
642671
# Create README for the bundle
643672
cat > "bundle-staging/$BUNDLE_NAME/README.txt" << EOF
644673
WRAITH Protocol Client Applications
@@ -668,6 +697,7 @@ jobs:
668697
shasum -a 256 "${BUNDLE_NAME}.tar.gz" > "${BUNDLE_NAME}.tar.gz.sha256"
669698
cd ..
670699
700+
echo ""
671701
echo "macOS bundle created:"
672702
ls -lh client-bundle/
673703
@@ -735,6 +765,15 @@ jobs:
735765
if-no-files-found: warn
736766
retention-days: 7
737767

768+
- name: Upload Linux AppImages separately
769+
if: matrix.os == 'ubuntu-latest'
770+
uses: actions/upload-artifact@v4
771+
with:
772+
name: wraith-appimages-linux-${{ matrix.arch }}
773+
path: appimage-staging/*.AppImage
774+
if-no-files-found: warn
775+
retention-days: 7
776+
738777
#############################################################################
739778
# Job 5: Create GitHub Release
740779
#############################################################################
@@ -764,16 +803,21 @@ jobs:
764803
mkdir -p release-assets
765804
766805
echo "Organizing artifacts for version $VERSION..."
806+
echo ""
807+
echo "Artifact structure:"
808+
find artifacts -type f | head -50
767809
768810
# Move protocol binary archives and checksums
769811
find artifacts -type f \
770812
\( -name "*.tar.gz" -o -name "*.zip" \) \
771813
! -name "wraith-clients-*" \
814+
! -name "*.AppImage" \
772815
-exec mv {} release-assets/ \; 2>/dev/null || true
773816
774817
# Move protocol binary checksums
775818
find artifacts -type f -name "*.sha256" \
776819
! -name "wraith-clients-*" \
820+
! -name "wraith-appimages-*" \
777821
-exec mv {} release-assets/ \; 2>/dev/null || true
778822
779823
# Move client bundle archives (tar.gz for Linux/macOS, zip for Windows)
@@ -786,6 +830,24 @@ jobs:
786830
find artifacts -type f -name "wraith-clients-*.sha256" \
787831
-exec mv {} release-assets/ \; 2>/dev/null || true
788832
833+
# Move AppImages as separate downloadable files (not in bundle)
834+
# Handle filenames with spaces properly
835+
echo ""
836+
echo "Processing AppImages..."
837+
while IFS= read -r -d '' file; do
838+
basename_file=$(basename "$file")
839+
# Rename with version if not already versioned
840+
if [[ "$basename_file" != *"$VERSION_NO_V"* ]]; then
841+
# Extract app name (remove _version_arch.AppImage)
842+
app_name=$(echo "$basename_file" | sed 's/_[0-9]*\.[0-9]*\.[0-9]*_.*.AppImage$//')
843+
new_name="${app_name}_${VERSION_NO_V}_amd64.AppImage"
844+
else
845+
new_name="$basename_file"
846+
fi
847+
mv "$file" "release-assets/$new_name"
848+
echo " Added AppImage: $new_name"
849+
done < <(find artifacts -type f -name "*.AppImage" -print0 2>/dev/null)
850+
789851
# Create combined checksums file
790852
cd release-assets
791853
@@ -805,8 +867,17 @@ jobs:
805867
cat wraith-clients-*.sha256 >> SHA256SUMS-clients.txt 2>/dev/null || true
806868
fi
807869
870+
# Generate checksums for AppImages and add to clients file
871+
echo "" >> SHA256SUMS-clients.txt
872+
echo "# AppImages (Linux)" >> SHA256SUMS-clients.txt
873+
for appimage in *.AppImage; do
874+
if [ -f "$appimage" ]; then
875+
sha256sum "$appimage" >> SHA256SUMS-clients.txt 2>/dev/null || true
876+
fi
877+
done
878+
808879
# Remove individual .sha256 files (they're now in the combined files)
809-
rm -f wraith-*.sha256 2>/dev/null || true
880+
rm -f wraith-x86_64-*.sha256 wraith-aarch64-*.sha256 wraith-clients-*.sha256 2>/dev/null || true
810881
811882
echo ""
812883
echo "Release assets:"
@@ -936,15 +1007,18 @@ jobs:
9361007
9371008
echo "### Desktop Client Application Bundles" >> $S
9381009
echo "" >> $S
939-
echo "All client applications are bundled together per platform:" >> $S
1010+
echo "Client applications are bundled together per platform:" >> $S
9401011
echo "" >> $S
9411012
echo "| Platform | Bundle Archive | Contents |" >> $S
9421013
echo "|----------|----------------|----------|" >> $S
943-
echo "| Linux x86_64 | wraith-clients-${VERSION_NO_V}-linux-x86_64.tar.gz | AppImage, .deb packages |" >> $S
1014+
echo "| Linux x86_64 | wraith-clients-${VERSION_NO_V}-linux-x86_64.tar.gz | .deb and .rpm packages |" >> $S
9441015
echo "| macOS | wraith-clients-${VERSION_NO_V}-macos-universal.tar.gz | .dmg installers |" >> $S
9451016
echo "| Windows x86_64 | wraith-clients-${VERSION_NO_V}-windows-x86_64.zip | .msi installers |" >> $S
9461017
echo "" >> $S
9471018
1019+
echo "**Linux AppImages** are available as separate downloads (not bundled)." >> $S
1020+
echo "" >> $S
1021+
9481022
echo "**Included Clients:**" >> $S
9491023
echo "- WRAITH Transfer - Secure file transfer" >> $S
9501024
echo "- WRAITH Chat - Encrypted messaging with voice/video" >> $S
@@ -955,7 +1029,7 @@ jobs:
9551029
echo "### Checksums" >> $S
9561030
echo "" >> $S
9571031
echo "- **SHA256SUMS.txt** - Protocol CLI binary checksums" >> $S
958-
echo "- **SHA256SUMS-clients.txt** - Client bundle checksums" >> $S
1032+
echo "- **SHA256SUMS-clients.txt** - Client bundle and AppImage checksums" >> $S
9591033
echo "" >> $S
9601034
9611035
echo "### Installation" >> $S
@@ -975,15 +1049,13 @@ jobs:
9751049
9761050
echo "**Desktop Clients:**" >> $S
9771051
echo '```bash' >> $S
978-
echo "# Extract the bundle for your platform" >> $S
1052+
echo "# Linux (AppImage - download separately)" >> $S
1053+
echo "chmod +x 'WRAITH Transfer_${VERSION_NO_V}_amd64.AppImage'" >> $S
1054+
echo "./'WRAITH Transfer_${VERSION_NO_V}_amd64.AppImage'" >> $S
1055+
echo "" >> $S
1056+
echo "# Linux (Debian/Ubuntu - from bundle)" >> $S
9791057
echo "tar xzf wraith-clients-${VERSION_NO_V}-linux-x86_64.tar.gz" >> $S
9801058
echo "cd wraith-clients-${VERSION_NO_V}-linux-x86_64" >> $S
981-
echo "" >> $S
982-
echo "# Linux (AppImage)" >> $S
983-
echo "chmod +x *.AppImage" >> $S
984-
echo "./wraith-transfer_*.AppImage" >> $S
985-
echo "" >> $S
986-
echo "# Linux (Debian/Ubuntu)" >> $S
9871059
echo "sudo dpkg -i *.deb" >> $S
9881060
echo "" >> $S
9891061
echo "# macOS - Extract and double-click the .dmg files" >> $S

0 commit comments

Comments
 (0)