From aef65a94bb3bd352447face119e4d7b69c86ebaa Mon Sep 17 00:00:00 2001 From: Ozgur Ersoy Date: Sun, 13 Apr 2025 14:56:02 +0200 Subject: [PATCH] fix(workflows): improve macOS signing workflow by adding nested artifact extraction and enhanced error handling --- .gitea/workflows/test-signing.yml | 34 ++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/test-signing.yml b/.gitea/workflows/test-signing.yml index 3a3d48cb..3d6e64df 100644 --- a/.gitea/workflows/test-signing.yml +++ b/.gitea/workflows/test-signing.yml @@ -3,17 +3,17 @@ name: Test macOS Signing on: push: branches: [ozgur/build] - workflow_dispatch: # Manual trigger de mümkün olsun + workflow_dispatch: # Manual trigger is also available jobs: test-signing: runs-on: macos steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - lfs: true - fetch-depth: 0 + # - name: Checkout repository + # uses: actions/checkout@v3 + # with: + # lfs: true + # fetch-depth: 0 - name: Download Artifact run: | @@ -31,18 +31,32 @@ jobs: # Download the artifact curl -L "$ARTIFACT_URL" -o build.zip - # Extract to Builds directory - unzip -o build.zip -d Builds/Mac/ + # First unzip - Outer artifact zip file + unzip -o build.zip -d temp_extract/ + + # Second unzip - Inner macOS app package + echo "Extracting inner zip file..." + INNER_ZIP=$(find temp_extract -name "*.zip" | head -1) + + if [[ -z "$INNER_ZIP" ]]; then + echo "Could not find inner zip in artifact" + exit 1 + fi + + echo "Found inner zip: $INNER_ZIP" + unzip -o "$INNER_ZIP" -d Builds/Mac/ # Find extracted app bundle APP_PATH=$(find Builds/Mac -type d -name "*.app" | head -1) if [[ -z "$APP_PATH" ]]; then - echo "Could not find app bundle in downloaded artifact" + echo "Could not find app bundle in extracted files" + echo "Directory contents:" + ls -la Builds/Mac/ exit 1 fi - echo "Downloaded app bundle: $APP_PATH" + echo "Found app bundle: $APP_PATH" echo "app_path=$APP_PATH" >> $GITHUB_ENV shell: bash