mirror of
https://github.com/trycua/computer.git
synced 2026-04-24 07:28:42 -05:00
Add debug steps for binary upload
This commit is contained in:
@@ -149,7 +149,11 @@ jobs:
|
|||||||
chmod +x scripts/build/build-release-notarized.sh
|
chmod +x scripts/build/build-release-notarized.sh
|
||||||
cd scripts/build
|
cd scripts/build
|
||||||
LOG_LEVEL=minimal ./build-release-notarized.sh
|
LOG_LEVEL=minimal ./build-release-notarized.sh
|
||||||
|
|
||||||
|
# Debug: List what files were actually created
|
||||||
|
echo "Files in .release directory:"
|
||||||
|
ls -la ../../../.release
|
||||||
|
|
||||||
- name: Generate SHA256 Checksums
|
- name: Generate SHA256 Checksums
|
||||||
id: generate_checksums
|
id: generate_checksums
|
||||||
working-directory: ./libs/lume/.release
|
working-directory: ./libs/lume/.release
|
||||||
@@ -161,7 +165,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
echo "## SHA256 Checksums" > checksums.txt
|
echo "## SHA256 Checksums" > checksums.txt
|
||||||
echo '```' >> checksums.txt
|
echo '```' >> checksums.txt
|
||||||
shasum -a 256 lume*.tar.gz >> checksums.txt
|
shasum -a 256 lume-*.tar.gz >> checksums.txt
|
||||||
echo '```' >> checksums.txt
|
echo '```' >> checksums.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -174,17 +178,16 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: lume-notarized
|
name: lume-notarized
|
||||||
path: |
|
path: ./libs/lume/.release/lume-*.tar.gz
|
||||||
./libs/lume/.release/lume*.tar.gz
|
if-no-files-found: warn
|
||||||
./libs/lume/.release/lume*.pkg.tar.gz
|
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
./libs/lume/.release/lume-*-darwin-*.tar.gz
|
./libs/lume/.release/lume-*.tar.gz
|
||||||
./libs/lume/.release/lume-*-darwin-*.pkg.tar.gz
|
./libs/lume/.release/lume-*.pkg.tar.gz
|
||||||
body: |
|
body: |
|
||||||
${{ steps.generate_checksums.outputs.checksums }}
|
${{ steps.generate_checksums.outputs.checksums }}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ VERSION=${VERSION:-"0.1.0"}
|
|||||||
# Move to the project root directory
|
# Move to the project root directory
|
||||||
pushd ../../ > /dev/null
|
pushd ../../ > /dev/null
|
||||||
|
|
||||||
|
# Ensure .release directory exists and is clean
|
||||||
|
mkdir -p .release
|
||||||
|
log "normal" "Ensuring .release directory exists and is accessible"
|
||||||
|
|
||||||
# Build the release version
|
# Build the release version
|
||||||
log "essential" "Building release version..."
|
log "essential" "Building release version..."
|
||||||
swift build -c release --product lume > /dev/null
|
swift build -c release --product lume > /dev/null
|
||||||
@@ -131,14 +135,17 @@ if [ ! -f "usr/local/bin/lume" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy extracted lume to ./.release/lume
|
# Get the release directory absolute path
|
||||||
cp -f usr/local/bin/lume "$(dirname "$PKG_PATH")/lume"
|
RELEASE_DIR="$(realpath "$(dirname "$PKG_PATH")")"
|
||||||
|
log "normal" "Using release directory: $RELEASE_DIR"
|
||||||
|
|
||||||
|
# Copy extracted lume to the release directory
|
||||||
|
cp -f usr/local/bin/lume "$RELEASE_DIR/lume"
|
||||||
|
|
||||||
# Create symbolic link in /usr/local/bin if not in minimal mode
|
# Create symbolic link in /usr/local/bin if not in minimal mode
|
||||||
if [ "$LOG_LEVEL" != "minimal" ] && [ "$LOG_LEVEL" != "none" ]; then
|
if [ "$LOG_LEVEL" != "minimal" ] && [ "$LOG_LEVEL" != "none" ]; then
|
||||||
log "normal" "Creating symbolic link..."
|
log "normal" "Creating symbolic link..."
|
||||||
cd "$(dirname "$PKG_PATH")"
|
sudo ln -sf "$RELEASE_DIR/lume" /usr/local/bin/lume
|
||||||
sudo ln -sf "$(pwd)/lume" /usr/local/bin/lume
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get architecture and create OS identifier
|
# Get architecture and create OS identifier
|
||||||
@@ -146,29 +153,35 @@ ARCH=$(uname -m)
|
|||||||
OS_IDENTIFIER="darwin-${ARCH}"
|
OS_IDENTIFIER="darwin-${ARCH}"
|
||||||
|
|
||||||
# Create versioned archives of the package with OS identifier in the name
|
# Create versioned archives of the package with OS identifier in the name
|
||||||
log "essential" "Creating archives with OS identifier..."
|
log "essential" "Creating archives in $RELEASE_DIR..."
|
||||||
cd "$(dirname "$PKG_PATH")"
|
cd "$RELEASE_DIR"
|
||||||
|
|
||||||
|
# Clean up any existing artifacts first to avoid conflicts
|
||||||
|
rm -f lume-*.tar.gz lume-*.pkg.tar.gz
|
||||||
|
|
||||||
# Create version-specific archives
|
# Create version-specific archives
|
||||||
log "essential" "Creating version-specific archives (${VERSION})..."
|
log "essential" "Creating version-specific archives (${VERSION})..."
|
||||||
|
# Package the binary
|
||||||
tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.tar.gz" lume > /dev/null 2>&1
|
tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.tar.gz" lume > /dev/null 2>&1
|
||||||
|
# Package the installer
|
||||||
tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.pkg.tar.gz" lume.pkg > /dev/null 2>&1
|
tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.pkg.tar.gz" lume.pkg > /dev/null 2>&1
|
||||||
|
|
||||||
# Delete temporary package files that we don't need to upload
|
|
||||||
log "normal" "Cleaning up temporary files..."
|
|
||||||
rm -f lume.pkg
|
|
||||||
rm -f lume
|
|
||||||
|
|
||||||
# Create sha256 checksum file
|
# Create sha256 checksum file
|
||||||
log "essential" "Generating checksums..."
|
log "essential" "Generating checksums..."
|
||||||
shasum -a 256 lume-*.tar.gz > checksums.txt
|
shasum -a 256 lume-*.tar.gz > checksums.txt
|
||||||
log "essential" "Package created successfully with checksums generated."
|
log "essential" "Package created successfully with checksums generated."
|
||||||
|
|
||||||
# Show what we're publishing
|
# Show what's in the release directory
|
||||||
ls -la *.tar.gz *.pkg.tar.gz
|
log "essential" "Files in release directory:"
|
||||||
|
ls -la "$RELEASE_DIR"
|
||||||
|
|
||||||
|
# Ensure correct permissions
|
||||||
|
chmod 644 "$RELEASE_DIR"/*.tar.gz "$RELEASE_DIR"/*.pkg.tar.gz "$RELEASE_DIR"/checksums.txt
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -rf "$TEMP_ROOT"
|
rm -rf "$TEMP_ROOT"
|
||||||
rm -rf "$EXTRACT_ROOT"
|
rm -rf "$EXTRACT_ROOT"
|
||||||
|
|
||||||
|
log "essential" "Build and packaging completed successfully."
|
||||||
Reference in New Issue
Block a user