name: Test Local Signing
on:
workflow_dispatch: # Manual trigger
push:
branches: [ozgur/build]
jobs:
test-local-signing:
runs-on: macos
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create Test Entitlements
run: |
echo "๐ Creating entitlements file..."
cat > LuckyWorld.entitlements << EOF
com.apple.security.cs.allow-jit
com.apple.security.cs.allow-unsigned-executable-memory
com.apple.security.cs.disable-library-validation
com.apple.security.cs.allow-dyld-environment-variables
com.apple.security.device.audio-input
com.apple.security.device.camera
EOF
echo "โ
Created entitlements file"
cat LuckyWorld.entitlements
shell: bash
- name: Create Test App Bundle
run: |
echo "๐ฆ Creating test app bundle..."
# Create test app bundle structure
TEST_APP_DIR="TestApp.app"
mkdir -p "$TEST_APP_DIR/Contents/MacOS"
# Create a simple test executable
echo '#!/bin/bash
echo "Hello from TestApp!"' > "$TEST_APP_DIR/Contents/MacOS/TestApp"
chmod +x "$TEST_APP_DIR/Contents/MacOS/TestApp"
# Create Info.plist
cat > "$TEST_APP_DIR/Contents/Info.plist" << EOF
CFBundleExecutable
TestApp
CFBundleIdentifier
com.luckyworld.testapp
CFBundleName
TestApp
CFBundlePackageType
APPL
CFBundleShortVersionString
1.0
LSMinimumSystemVersion
10.10
EOF
echo "โ
Created test app bundle"
echo "APP_PATH=$(pwd)/$TEST_APP_DIR" >> "$GITHUB_ENV"
shell: bash
- name: Sign and Notarize App
uses: lando/code-sign-action@v3
with:
file: ${{ env.APP_PATH }}
certificate-data: ${{ secrets.MACOS_CERTIFICATE }}
certificate-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
apple-team-id: ${{ secrets.APPLE_TEAM_ID }}
apple-notary-user: ${{ secrets.APPLE_NOTARY_USER }}
apple-notary-password: ${{ secrets.APPLE_NOTARY_PASSWORD }}
apple-product-id: com.luckyworld.testapp
options: --options runtime --entitlements LuckyWorld.entitlements
- name: Cleanup
if: always()
run: |
echo "๐งน Cleaning up..."
rm -rf TestApp.app || true
echo "โ
Cleanup complete"
shell: bash