81 lines
2.7 KiB
YAML
81 lines
2.7 KiB
YAML
name: Build iOS IPA
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Fix permissions
|
|
run: chmod -R +x node_modules/.bin/
|
|
|
|
- name: Fix PNG assets
|
|
run: |
|
|
find assets -name "*.png" | while read f; do
|
|
sips -s format png "$f" --out "$f"
|
|
done
|
|
|
|
- name: Expo prebuild
|
|
run: npx expo prebuild --platform ios --clean
|
|
env:
|
|
EXPO_NO_DOTENV: 1
|
|
|
|
- name: Build unsigned app
|
|
run: |
|
|
WORKSPACE=$(find ios -name "*.xcworkspace" -type d | head -1)
|
|
SCHEME=$(basename "$WORKSPACE" .xcworkspace)
|
|
echo "Workspace: $WORKSPACE | Scheme: $SCHEME"
|
|
xcodebuild build \
|
|
-workspace "$WORKSPACE" \
|
|
-scheme "$SCHEME" \
|
|
-configuration Release \
|
|
-sdk iphoneos \
|
|
-derivedDataPath "$RUNNER_TEMP/DerivedData" \
|
|
CODE_SIGN_IDENTITY="" \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
ENABLE_BITCODE=NO
|
|
|
|
- name: Locate app
|
|
run: |
|
|
echo "=== Xcode default DerivedData ==="
|
|
find ~/Library/Developer/Xcode/DerivedData -name "*.app" -type d 2>/dev/null | grep -v "\.xctest" || echo "nothing"
|
|
echo "=== RUNNER_TEMP ==="
|
|
find "$RUNNER_TEMP" -name "*.app" -type d 2>/dev/null | grep -v "\.xctest" || echo "nothing"
|
|
echo "=== runner home ==="
|
|
find /Users/runner -maxdepth 8 -name "*.app" -type d 2>/dev/null | grep -v "\.xctest" | grep -v "Xcode.app" | grep -v "CoreSimulator" | grep -v "node_modules" | grep -v "Cellar" || echo "nothing"
|
|
|
|
- name: Package IPA
|
|
run: |
|
|
APP_PATH=$(find "$RUNNER_TEMP/DerivedData/Build/Products" -name "*.app" -type d 2>/dev/null | grep -v "\.xctest" | head -1)
|
|
if [ -z "$APP_PATH" ]; then
|
|
APP_PATH=$(find /Users/runner -maxdepth 8 -name "*.app" -type d 2>/dev/null | grep -v "\.xctest" | grep -v "Xcode.app" | grep -v "CoreSimulator" | grep -v "node_modules" | grep -v "Cellar" | head -1)
|
|
fi
|
|
echo "APP_PATH: $APP_PATH"
|
|
if [ -z "$APP_PATH" ]; then echo "ERROR: .app not found"; exit 1; fi
|
|
mkdir -p Payload
|
|
cp -r "$APP_PATH" Payload/
|
|
zip -qr burmalda-unsigned.ipa Payload
|
|
rm -rf Payload
|
|
|
|
- name: Upload IPA artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: burmalda-unsigned-ipa
|
|
path: burmalda-unsigned.ipa
|
|
retention-days: 30
|