iOS Build using GH Actions
Build & Push Docker Images / test-backend (push) Successful in 21s
Build & Push Docker Images / test-frontend (push) Successful in 22s
Build & Push Docker Images / build-backend (push) Successful in 16s
Build & Push Docker Images / build-frontend (push) Successful in 17s
Build & Push Docker Images / test-backend (push) Successful in 21s
Build & Push Docker Images / test-frontend (push) Successful in 22s
Build & Push Docker Images / build-backend (push) Successful in 16s
Build & Push Docker Images / build-frontend (push) Successful in 17s
This commit is contained in:
Executable
+56
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCHEME="App"
|
||||
PROJECT="ios/App/App.xcodeproj"
|
||||
WORKSPACE="ios/App/App.xcworkspace"
|
||||
ARCHIVE_PATH="build/App.xcarchive"
|
||||
IPA_DIR="build"
|
||||
EXPORT_OPTIONS="${EXPORT_OPTIONS:-scripts/export-options.plist}"
|
||||
|
||||
echo "=== FarmaFinder iOS Build Script ==="
|
||||
|
||||
echo "[1/6] Installing frontend dependencies..."
|
||||
(cd frontend && npm ci)
|
||||
|
||||
echo "[2/6] Building web bundle..."
|
||||
npm run build:web
|
||||
|
||||
echo "[3/6] Syncing Capacitor..."
|
||||
if [ ! -d "ios/App/App.xcodeproj" ]; then
|
||||
echo " Adding iOS platform..."
|
||||
npx cap add ios
|
||||
fi
|
||||
npx cap sync ios
|
||||
|
||||
echo "[4/6] Installing CocoaPods..."
|
||||
(cd ios/App && pod install --repo-update)
|
||||
|
||||
echo "[5/6] Archiving..."
|
||||
xcodebuild archive \
|
||||
-workspace "$WORKSPACE" \
|
||||
-scheme "$SCHEME" \
|
||||
-configuration Release \
|
||||
-destination "generic/platform=iOS" \
|
||||
-archivePath "$ARCHIVE_PATH" \
|
||||
-allowProvisioningUpdates \
|
||||
| xcpretty --color || true
|
||||
|
||||
echo "[6/6] Exporting IPA..."
|
||||
xcodebuild -exportArchive \
|
||||
-archivePath "$ARCHIVE_PATH" \
|
||||
-exportOptionsPlist "$EXPORT_OPTIONS" \
|
||||
-exportPath "$IPA_DIR" \
|
||||
-allowProvisioningUpdates \
|
||||
| xcpretty --color || true
|
||||
|
||||
IPA_FILE=$(find "$IPA_DIR" -name "*.ipa" -maxdepth 1 | head -1)
|
||||
if [ -n "$IPA_FILE" ]; then
|
||||
echo ""
|
||||
echo "=== Build complete ==="
|
||||
echo "IPA: $IPA_FILE"
|
||||
echo "Size: $(du -h "$IPA_FILE" | cut -f1)"
|
||||
else
|
||||
echo "ERROR: IPA not found in $IPA_DIR/"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>app-store</string>
|
||||
<key>teamID</key>
|
||||
<string>YOUR_TEAM_ID</string>
|
||||
<key>uploadSymbols</key>
|
||||
<true/>
|
||||
<key>uploadBitcode</key>
|
||||
<false/>
|
||||
<key>signingStyle</key>
|
||||
<string>manual</string>
|
||||
<key>provisioningProfiles</key>
|
||||
<dict>
|
||||
<key>net.hacecalor.farmafinder</key>
|
||||
<string>YOUR_PROVISIONING_PROFILE_NAME</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user