Skip to content

Commit 3bc8656

Browse files
Working on iOS GitHub CI
1 parent 98564b6 commit 3bc8656

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

.github/workflows/pr_validation.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
defaults:
7878
run:
7979
working-directory: ./packages/flutter_test_runners/example_deep_links
80+
env:
81+
EXPORT_OPTS_PATH: $RUNNER_TEMP/ExportOptions.plist
8082

8183
steps:
8284
- name: Install the Apple certificate and provisioning profile
@@ -110,7 +112,6 @@ jobs:
110112
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
111113
112114
# Save ExportOptions.plist from Base64 to file
113-
EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist
114115
echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH
115116
116117
- name: Checkout repository
@@ -121,19 +122,6 @@ jobs:
121122
sudo xcode-select -s /Applications/Xcode.app
122123
xcodebuild -version
123124
124-
- name: Create and Boot iOS Simulator
125-
run: |
126-
# List available devices and runtimes
127-
xcrun simctl list devices
128-
xcrun simctl list runtimes
129-
130-
# Create a new simulator (if needed)
131-
SIMULATOR_ID=$(xcrun simctl create "GitHubActions-Simulator" "iPhone 14" "com.apple.CoreSimulator.SimRuntime.iOS-17-0")
132-
133-
# Boot the simulator
134-
xcrun simctl boot "$SIMULATOR_ID"
135-
xcrun simctl list devices booted
136-
137125
- name: Set up Flutter
138126
uses: subosito/flutter-action@v2
139127
with:
@@ -144,7 +132,21 @@ jobs:
144132
run: flutter pub get
145133

146134
- name: Build iOS App
147-
run: flutter build ios --debug --export-options-plist=$EXPORT_OPTS_PATH
135+
run: flutter build ipa --debug --export-options-plist=$EXPORT_OPTS_PATH
148136

149137
- name: Install iOS App
150138
run: flutter install ipa
139+
140+
- name: Create and Boot iOS Simulator
141+
run: |
142+
# List available devices and runtimes
143+
xcrun simctl list devices
144+
xcrun simctl list runtimes
145+
146+
# Create a new simulator (if needed)
147+
SIMULATOR_ID=$(xcrun simctl create "GitHubActions-Simulator" "iPhone 14" "com.apple.CoreSimulator.SimRuntime.iOS-17-0")
148+
149+
# Boot the simulator
150+
xcrun simctl boot "$SIMULATOR_ID"
151+
xcrun simctl list devices booted
152+

0 commit comments

Comments
 (0)