Skip to content

Commit 4e8c317

Browse files
committed
fix: Extract zip artifacts before accessing app bundles in macOS workflow
- Add conditional zip extraction for downloaded artifacts - Add cleanup step to remove temporary directories and keychain - Fixes 'No such file or directory' error when copying app bundles
1 parent 43ac784 commit 4e8c317

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/build-macos.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ jobs:
153153
# Create temp directory
154154
mkdir -p dmg_temp
155155
156+
# Extract zip files if they exist
157+
if [ -f "artifacts/macos-aarch64.zip" ]; then
158+
echo "📦 Extracting macos-aarch64.zip..."
159+
unzip -q artifacts/macos-aarch64.zip -d artifacts/macos-aarch64/
160+
fi
161+
162+
if [ -f "artifacts/macos-x86_64.zip" ]; then
163+
echo "📦 Extracting macos-x86_64.zip..."
164+
unzip -q artifacts/macos-x86_64.zip -d artifacts/macos-x86_64/
165+
fi
166+
156167
# Find the actual app paths
157168
AARCH64_APP=$(find artifacts/macos-aarch64 -name "Claudia.app" -type d | head -1)
158169
X86_64_APP=$(find artifacts/macos-x86_64 -name "Claudia.app" -type d | head -1)
@@ -246,3 +257,16 @@ jobs:
246257
with:
247258
name: macos-universal
248259
path: dist/macos-universal/*
260+
261+
- name: Cleanup
262+
if: always()
263+
run: |
264+
echo "🧹 Cleaning up temporary directories..."
265+
rm -rf dmg_temp temp_x86 artifacts
266+
267+
# Clean up keychain
268+
if [ -n "$RUNNER_TEMP" ] && [ -f "$RUNNER_TEMP/app-signing.keychain-db" ]; then
269+
security delete-keychain "$RUNNER_TEMP/app-signing.keychain-db" || true
270+
fi
271+
272+
echo "✅ Cleanup complete"

0 commit comments

Comments
 (0)