Skip to content

Commit 507ffb1

Browse files
committed
Updated Workflow
1 parent dc65440 commit 507ffb1

1 file changed

Lines changed: 36 additions & 9 deletions

File tree

.github/workflows/build-ipa.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ on:
1818
- Debug
1919

2020
env:
21-
XCODE_VERSION: '16.2'
22-
IOS_SDK: 'iphoneos26.0'
21+
XCODE_VERSION: 'latest-stable'
2322

2423
jobs:
2524
build:
@@ -33,18 +32,33 @@ jobs:
3332
- name: Setup Latest Xcode
3433
uses: maxim-lobanov/setup-xcode@v1
3534
with:
36-
xcode-version: '16.2'
35+
xcode-version: 'latest'
3736

3837
- name: Select Xcode Version
39-
run: sudo xcode-select -switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer
38+
run: |
39+
# Use the latest Xcode that was just installed
40+
LATEST_XCODE=$(find /Applications -name "Xcode*.app" | sort -V | tail -1)
41+
echo "Using Xcode: $LATEST_XCODE"
42+
sudo xcode-select -switch "$LATEST_XCODE/Contents/Developer"
4043
4144
- name: Show Xcode Version
4245
run: |
4346
xcodebuild -version
4447
xcode-select -print-path
4548
4649
- name: Show Available Simulators
47-
run: xcrun simctl list devices available
50+
run: |
51+
xcrun simctl list devices available
52+
echo "Available iOS SDKs:"
53+
xcodebuild -showsdks | grep iOS
54+
55+
- name: Download Latest iOS Platform
56+
run: |
57+
# Download all available iOS platforms
58+
sudo xcodebuild -downloadAllPlatforms || true
59+
# Show what we have after download
60+
echo "iOS SDKs after download:"
61+
xcodebuild -showsdks | grep iOS
4862
4963
- name: Cache Derived Data
5064
uses: actions/cache@v3
@@ -54,6 +68,19 @@ jobs:
5468
restore-keys: |
5569
${{ runner.os }}-derived-data-
5670
71+
- name: Get Dynamic Build Info
72+
id: build_info
73+
run: |
74+
# Get the latest iOS SDK dynamically
75+
LATEST_IOS_SDK=$(xcodebuild -showsdks | grep 'iOS' | tail -1 | awk '{print $NF}')
76+
XCODE_VERSION=$(xcodebuild -version | head -1 | awk '{print $2}')
77+
78+
echo "latest_ios_sdk=${LATEST_IOS_SDK}" >> $GITHUB_OUTPUT
79+
echo "xcode_version=${XCODE_VERSION}" >> $GITHUB_OUTPUT
80+
81+
echo "Latest iOS SDK: ${LATEST_IOS_SDK}"
82+
echo "Xcode Version: ${XCODE_VERSION}"
83+
5784
- name: Clean Build Directory
5885
run: |
5986
rm -rf build/
@@ -132,8 +159,8 @@ jobs:
132159
echo "| **App Version** | ${{ steps.app_version.outputs.app_version }} |" >> $GITHUB_STEP_SUMMARY
133160
echo "| **Build Number** | ${{ steps.app_version.outputs.build_number }} |" >> $GITHUB_STEP_SUMMARY
134161
echo "| **Configuration** | ${{ github.event.inputs.build_configuration || 'Release' }} |" >> $GITHUB_STEP_SUMMARY
135-
echo "| **Xcode Version** | ${{ env.XCODE_VERSION }} |" >> $GITHUB_STEP_SUMMARY
136-
echo "| **iOS SDK** | ${{ env.IOS_SDK }} |" >> $GITHUB_STEP_SUMMARY
162+
echo "| **Xcode Version** | ${{ steps.build_info.outputs.xcode_version }} |" >> $GITHUB_STEP_SUMMARY
163+
echo "| **iOS SDK** | ${{ steps.build_info.outputs.latest_ios_sdk }} |" >> $GITHUB_STEP_SUMMARY
137164
echo "| **Runner OS** | ${{ runner.os }} |" >> $GITHUB_STEP_SUMMARY
138165
echo "| **Commit** | \`${{ github.sha }}\` |" >> $GITHUB_STEP_SUMMARY
139166
echo "" >> $GITHUB_STEP_SUMMARY
@@ -169,7 +196,7 @@ jobs:
169196
- name: Setup Latest Xcode
170197
uses: maxim-lobanov/setup-xcode@v1
171198
with:
172-
xcode-version: '16.2'
199+
xcode-version: 'latest'
173200

174201
- name: Get App Version
175202
id: app_version
@@ -220,7 +247,7 @@ jobs:
220247
- For App Store distribution, use signed builds through official channels
221248
222249
### 🔧 Technical Details
223-
- Built with Xcode ${{ env.XCODE_VERSION }}
250+
- Built with latest Xcode and iOS SDK
224251
- Swift 5.0 with modern concurrency
225252
- SwiftUI + AVFoundation architecture
226253

0 commit comments

Comments
 (0)