Skip to content

Commit aef3f23

Browse files
committed
spm workflow
1 parent 7f0a160 commit aef3f23

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ios_spm.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: iOS Build CI (CocoaPods + SPM)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-ios:
11+
runs-on: macos-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Flutter
18+
uses: subosito/flutter-action@v2
19+
with:
20+
channel: "stable"
21+
22+
- name: Flutter pub get
23+
run: flutter pub get
24+
25+
# 🧪 Build iOS example using CocoaPods
26+
- name: Build iOS example with CocoaPods
27+
working-directory: example
28+
run: |
29+
echo "=== Building with CocoaPods ==="
30+
cd ios
31+
pod repo update
32+
pod install
33+
cd ..
34+
flutter config --no-enable-swift-package-manager
35+
flutter build ios --no-codesign --verbose
36+
37+
# 🧹 Clean build + prepare for SPM test
38+
- name: Clean and prepare for SPM test
39+
working-directory: example
40+
run: |
41+
echo "=== Cleaning Pods ==="
42+
rm -rf ios/Pods ios/Podfile.lock
43+
flutter clean
44+
45+
# 🧪 Step 7: Build iOS example using Swift Package Manager
46+
- name: Build iOS example with Swift Package Manager
47+
working-directory: example
48+
run: |
49+
echo "=== Building with SPM ==="
50+
flutter config --enable-swift-package-manager
51+
flutter build ios --no-codesign --verbose
52+
53+
# ✅ Step 8: Verify output
54+
- name: Verify build artifacts
55+
run: |
56+
echo "✅ Both CocoaPods and SPM builds succeeded."

0 commit comments

Comments
 (0)