Skip to content

Commit 0cafb3c

Browse files
committed
wip
1 parent c367c0f commit 0cafb3c

2 files changed

Lines changed: 175 additions & 226 deletions

File tree

.github/workflows/build.yml

Lines changed: 25 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,14 @@ jobs:
5454
- name: Checkout code
5555
uses: actions/checkout@v4
5656

57-
- name: Cache Homebrew packages
57+
- name: Cache Homebrew downloads
5858
uses: actions/cache@v4
59+
continue-on-error: true
5960
with:
60-
path: |
61-
~/Library/Caches/Homebrew
62-
/opt/homebrew/Cellar/mariadb-connector-c
63-
/opt/homebrew/Cellar/libpq
64-
/usr/local/Cellar/mariadb-connector-c
65-
/usr/local/Cellar/libpq
66-
key: brew-deps-${{ runner.os }}-${{ hashFiles('**/build-release.sh') }}
61+
path: ~/Library/Caches/Homebrew
62+
key: brew-downloads-${{ runner.os }}-${{ hashFiles('**/build-release.sh') }}
6763
restore-keys: |
68-
brew-deps-${{ runner.os }}-
64+
brew-downloads-${{ runner.os }}-
6965
7066
- name: Install ARM64 Homebrew dependencies
7167
run: |
@@ -326,16 +322,14 @@ jobs:
326322
lipo -info Libs/libmariadb_universal.a
327323
ls -lh Libs/libmariadb_universal.a
328324
329-
- name: Cache Homebrew packages
325+
- name: Cache Homebrew downloads
330326
uses: actions/cache@v4
327+
continue-on-error: true
331328
with:
332-
path: |
333-
~/Library/Caches/Homebrew
334-
/opt/homebrew/Cellar/mariadb-connector-c
335-
/opt/homebrew/Cellar/libpq
336-
key: brew-arm64-${{ runner.os }}-${{ hashFiles('**/build-release.sh') }}
329+
path: ~/Library/Caches/Homebrew
330+
key: brew-arm64-downloads-${{ runner.os }}-${{ hashFiles('**/build-release.sh') }}
337331
restore-keys: |
338-
brew-arm64-${{ runner.os }}-
332+
brew-arm64-downloads-${{ runner.os }}-
339333
340334
- name: Install ARM64 dependencies
341335
run: |
@@ -420,21 +414,18 @@ jobs:
420414
run: |
421415
echo "Creating DMG installer..."
422416
423-
# Rename app to remove architecture suffix for better UX
424-
if [ -d "build/Release/TablePro-arm64.app" ]; then
425-
cp -R "build/Release/TablePro-arm64.app" "build/Release/TablePro.app"
426-
else
427-
echo "❌ ERROR: App bundle not found"
428-
exit 1
429-
fi
417+
# Install create-dmg tool for proper icon handling in CI
418+
echo "📦 Installing create-dmg tool..."
419+
brew install create-dmg
430420
431421
# Make DMG creation script executable
432422
chmod +x create-dmg.sh
433423
434424
# Create DMG with version from git tag or use default
425+
# The script handles app renaming internally
435426
VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.1.13")
436427
echo "📌 Using version: $VERSION"
437-
./create-dmg.sh "$VERSION" "arm64" "build/Release/TablePro.app"
428+
./create-dmg.sh "$VERSION" "arm64" "build/Release/TablePro-arm64.app"
438429
439430
# Verify DMG was created - check for the specific file or any arm64 DMG
440431
DMG_FILE="build/Release/TablePro-${VERSION}-arm64.dmg"
@@ -511,16 +502,14 @@ jobs:
511502
echo "✅ Universal library found"
512503
lipo -info Libs/libmariadb_universal.a
513504
514-
- name: Cache Homebrew packages
505+
- name: Cache Homebrew downloads
515506
uses: actions/cache@v4
507+
continue-on-error: true
516508
with:
517-
path: |
518-
~/Library/Caches/Homebrew
519-
/usr/local/Cellar/mariadb-connector-c
520-
/usr/local/Cellar/libpq
521-
key: brew-x86_64-${{ runner.os }}-${{ hashFiles('**/build-release.sh') }}
509+
path: ~/Library/Caches/Homebrew
510+
key: brew-x86_64-downloads-${{ runner.os }}-${{ hashFiles('**/build-release.sh') }}
522511
restore-keys: |
523-
brew-x86_64-${{ runner.os }}-
512+
brew-x86_64-downloads-${{ runner.os }}-
524513
525514
- name: Install Rosetta 2
526515
run: |
@@ -654,21 +643,18 @@ jobs:
654643
run: |
655644
echo "Creating DMG installer..."
656645
657-
# Rename app to remove architecture suffix for better UX
658-
if [ -d "build/Release/TablePro-x86_64.app" ]; then
659-
cp -R "build/Release/TablePro-x86_64.app" "build/Release/TablePro.app"
660-
else
661-
echo "❌ ERROR: App bundle not found"
662-
exit 1
663-
fi
646+
# Install create-dmg tool for proper icon handling in CI
647+
echo "📦 Installing create-dmg tool..."
648+
brew install create-dmg
664649
665650
# Make DMG creation script executable
666651
chmod +x create-dmg.sh
667652
668653
# Create DMG with version from git tag or use default
654+
# The script handles app renaming internally
669655
VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.1.13")
670656
echo "📌 Using version: $VERSION"
671-
./create-dmg.sh "$VERSION" "x86_64" "build/Release/TablePro.app"
657+
./create-dmg.sh "$VERSION" "x86_64" "build/Release/TablePro-x86_64.app"
672658
673659
# Verify DMG was created - check for the specific file or any x86_64 DMG
674660
DMG_FILE="build/Release/TablePro-${VERSION}-x86_64.dmg"

0 commit comments

Comments
 (0)