Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ on:
- "**.xcworkspace/**"
- "Assets.xcassets/**"
- ".github/workflows/dev-build.yml"
pull_request:
paths:
- "**.swift"
- "**.xcodeproj/**"
- "**.xcworkspace/**"
- "Assets.xcassets/**"
- ".github/workflows/dev-build.yml"
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -51,11 +58,21 @@ jobs:

- name: Create DMG
run: |
# Find the built app
APP_PATH=$(find ./build/Build/Products/Release -name "*.app" -type d | head -n 1)
APP_NAME="Kaset.app"
BUILD_DIR="./build/Build/Products/Release"

# debug: show what's in the build folder
echo "Contents of $BUILD_DIR:"
ls -la "$BUILD_DIR" || true

# clean previous artifacts
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment uses "artifact" (singular) but the command removes multiple artifacts (kaset-dev.dmg and dmg_contents). The comment should use "artifacts" (plural) to accurately reflect what the command does.

Copilot uses AI. Check for mistakes.
rm -rf dmg_contents kaset-dev.dmg

# find the main app explicitly by name
APP_PATH=$(find "$BUILD_DIR" -type d -name "$APP_NAME" | head -n 1)

if [ -z "$APP_PATH" ]; then
echo "Error: Could not find built app"
echo "Error: Could not find $APP_NAME in $BUILD_DIR"
exit 1
fi

Expand All @@ -73,6 +90,7 @@ jobs:

- name: Upload DMG
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4
if: github.event_name != 'pull_request'
with:
name: kaset-dev-${{ steps.slug.outputs.sha_short }}
path: kaset-dev.dmg
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,21 @@ jobs:

- name: Create DMG
run: |
APP_PATH=$(find ./build/Build/Products/Release -name "*.app" -type d | head -n 1)
APP_NAME="Kaset.app"
BUILD_DIR="./build/Build/Products/Release"

# debug: show what's in the build folder
echo "Contents of $BUILD_DIR:"
ls -la "$BUILD_DIR" || true

# clean previous artifact
rm -f kaset.dmg || true

# find the main app explicitly by name to avoid Sparkle Updater.app
APP_PATH=$(find "$BUILD_DIR" -type d -name "$APP_NAME" | head -n 1)

if [ -z "$APP_PATH" ]; then
echo "Error: Could not find built app"
echo "Error: Could not find $APP_NAME in $BUILD_DIR"
exit 1
fi

Expand All @@ -105,7 +116,11 @@ jobs:
fi

# Verify Universal Binary (Intel + Apple Silicon)
ARCHS=$(lipo -archs "$APP_PATH/Contents/MacOS/Kaset" 2>/dev/null || echo "unknown")
if [ -f "$APP_PATH/Contents/MacOS/Kaset" ]; then
ARCHS=$(lipo -archs "$APP_PATH/Contents/MacOS/Kaset" 2>/dev/null || echo "unknown")
else
ARCHS="unknown"
fi
echo "Architectures: $ARCHS"
if [[ "$ARCHS" != *"x86_64"* ]] || [[ "$ARCHS" != *"arm64"* ]]; then
echo "Error: App is not a Universal Binary (found: $ARCHS)"
Expand Down