1+ name : Build iOS App 
2+ 
3+ on :
4+   push :
5+     branches :
6+       - main 
7+   pull_request :
8+     branches :
9+       - main 
10+ 
11+ jobs :
12+   build-ios :
13+     runs-on : macos-latest 
14+ 
15+     steps :
16+       #  Step 1: Checkout the repository
17+       - name : Checkout repository 
18+         uses : actions/checkout@v3 
19+ 
20+       #  Step 2: Set up Python (needed for Ren'Py dependencies)
21+       - name : Set up Python 
22+         uses : actions/setup-python@v4 
23+         with :
24+           python-version : ' 3.9' #  Adjust based on Ren'Py requirements
25+ 
26+       #  Step 3: Install Ren'Py and dependencies (if applicable)
27+       - name : Install Ren'Py dependencies 
28+         run : | 
29+           pip install -r requirements.txt  # If your project has a requirements.txt 
30+           # Add any additional setup for Ren'Py if needed 
31+ 
32+ #  Step 4: Find Xcode project and scheme
33+       - name : Find Xcode project and scheme 
34+         run : | 
35+           XCODEPROJ=$(find "$GITHUB_WORKSPACE/ios" -maxdepth 1 -name "*.xcodeproj" | head -n 1) 
36+           if [ -z "$XCODEPROJ" ]; then 
37+             echo "Error: No .xcodeproj file found in $GITHUB_WORKSPACE/ios" 
38+             exit 1 
39+           fi 
40+           echo "XCODEPROJ_PATH=$XCODEPROJ" >> $GITHUB_ENV 
41+           SCHEMES=$(xcodebuild -list -project "$XCODEPROJ" | awk '/Schemes:/{flag=1; next} flag && /^ /{print}' | sed 's/^[ \t]*//') 
42+           if [ -z "$SCHEMES" ]; then 
43+             echo "Error: No schemes found in the project" 
44+             exit 1 
45+           fi 
46+           SCHEME_NAME=$(echo "$SCHEMES" | head -n 1) 
47+           echo "SCHEME_NAME=$SCHEME_NAME" >> $GITHUB_ENV 
48+           echo "Found Xcode project: $(basename "$XCODEPROJ") with scheme: $SCHEME_NAME" 
49+           echo "Available schemes:" 
50+           echo "$SCHEMES" 
51+ 
52+ #  Step 5: Build the iOS app
53+       - name : Build iOS app 
54+         run : | 
55+           xcodebuild -project "${{ env.XCODEPROJ_PATH }}" \ 
56+                      -scheme "${{ env.SCHEME_NAME }}" \ 
57+                      -sdk iphoneos \ 
58+                      -configuration Release \ 
59+                      build 
60+ 
61+ #  Step 6: Archive the build (optional)
62+       - name : Archive the build 
63+         run : | 
64+           xcodebuild -project "${{ env.XCODEPROJ_PATH }}" \ 
65+                      -scheme "${{ env.SCHEME_NAME }}" \ 
66+                      -sdk iphoneos \ 
67+                      -configuration Release \ 
68+                      -archivePath "$GITHUB_WORKSPACE/build/BattleoftheBulges.xcarchive" \ 
69+                      archive 
70+ 
71+ #  Step 7: Upload artifacts (optional)
72+       - name : Upload build artifacts 
73+         uses : actions/upload-artifact@v4 
74+         with :
75+           name : ios-build 
76+           path : | 
77+             ${{ env.XCODEPROJ_PATH }} 
78+             $GITHUB_WORKSPACE/build/BattleoftheBulges.xcarchive 
0 commit comments