fix(workflows): enhance macOS signing workflow by improving artifact extraction and validation steps
Some checks failed
Test macOS Signing / test-signing (push) Failing after 16m4s

This commit is contained in:
Ozgur 2025-04-13 15:07:47 +02:00
parent aef65a94bb
commit 7e3c22f002
No known key found for this signature in database
GPG Key ID: 66CDF27505A35546

View File

@ -9,13 +9,14 @@ 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
- name: Download and Extract Artifact
id: extract-artifact
run: |
# Create directories
mkdir -p Builds/Mac
@ -23,7 +24,7 @@ jobs:
# Download specific artifact
echo "Downloading build artifact..."
# Sabit artifact URL kullan
# Use fixed artifact URL
ARTIFACT_URL="https://luckyrobots.com/LuckyRobots/LuckyWorld/actions/runs/84/artifacts/LuckyRobots-macOS"
echo "Using artifact URL: $ARTIFACT_URL"
@ -32,8 +33,13 @@ jobs:
curl -L "$ARTIFACT_URL" -o build.zip
# First unzip - Outer artifact zip file
echo "Extracting outer zip file..."
unzip -o build.zip -d temp_extract/
# List the contents of temp_extract
echo "Contents of temp_extract:"
ls -la temp_extract/
# Second unzip - Inner macOS app package
echo "Extracting inner zip file..."
INNER_ZIP=$(find temp_extract -name "*.zip" | head -1)
@ -46,24 +52,29 @@ jobs:
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)
# Recursive search for .app directory
echo "Searching for .app bundle..."
APP_PATH=$(find Builds -type d -name "*.app" -print 2>/dev/null | head -1)
if [[ -z "$APP_PATH" ]]; then
echo "Could not find app bundle in extracted files"
echo "Directory contents:"
ls -la Builds/Mac/
echo "Contents of Builds directory:"
find Builds -type d | sort
echo "All directories in workspace:"
find . -type d -maxdepth 4 | grep -v "node_modules\|.git" | sort
exit 1
fi
echo "Found app bundle: $APP_PATH"
echo "app_path=$APP_PATH" >> $GITHUB_ENV
echo "app_path=$APP_PATH" >> $GITHUB_OUTPUT
shell: bash
- name: Validate App Path
id: validate-app
run: |
APP_PATH="$app_path"
APP_PATH="${{ steps.extract-artifact.outputs.app_path }}"
echo "Validating path: $APP_PATH"
if [ ! -d "$APP_PATH" ]; then
echo "Error: Application path does not exist: $APP_PATH"
@ -71,6 +82,8 @@ jobs:
fi
echo "Will sign and notarize: $APP_PATH"
echo "Contents of app bundle:"
ls -la "$APP_PATH"
echo "app_path=$APP_PATH" >> $GITHUB_OUTPUT
shell: bash
@ -91,7 +104,7 @@ jobs:
file: ${{ steps.validate-app.outputs.app_path }}
certificate-data: ${{ secrets.MACOS_CERTIFICATE }}
certificate-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
certificate-id: ${{ secrets.APPLE_TEAM_ID }}
apple-team-id: "${{ secrets.APPLE_TEAM_ID }}"
options: --force --options runtime --deep --timestamp --entitlements ./LuckyRobots.entitlements
- name: Notarize macOS App