From c69a84569b80de4b5df2f7e93584d1b89ca5d9bf Mon Sep 17 00:00:00 2001 From: efrilm Date: Fri, 29 May 2026 18:30:44 +0700 Subject: [PATCH] update workflow archieve --- .github/workflows/ios.yml | 41 +++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index f550238..0d6d61b 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -59,6 +59,11 @@ jobs: cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$UUID.mobileprovision echo "Installed provisioning profile UUID: $UUID" + # ── Disable SPM ───────────────────────────────────────────────────────── + + - name: Disable Swift Package Manager + run: flutter config --no-enable-swift-package-manager + # ── CocoaPods ─────────────────────────────────────────────────────────── - name: Install CocoaPods Dependencies @@ -67,41 +72,43 @@ jobs: rm -f Podfile.lock pod install --repo-update - # ── Build ─────────────────────────────────────────────────────────────── + # ── Build & Archive ───────────────────────────────────────────────────── - - name: Build iOS Archive + - name: Build iOS (no codesign) + run: flutter build ios --release --no-codesign + + - name: Re-run pod install to apply Podfile signing settings + run: | + cd ios + pod install + + - name: Archive with Xcode env: TEAM_ID: ${{ secrets.TEAM_ID }} run: | - # Disable Swift Package Manager — use CocoaPods only (required for plugins not yet SPM-compatible) - flutter config --no-enable-swift-package-manager + cat > $RUNNER_TEMP/signing.xcconfig << 'XCCONFIG' + CODE_SIGN_STYLE = Manual + CODE_SIGN_IDENTITY = iPhone Distribution + PROVISIONING_PROFILE_SPECIFIER = Enaklo Owner App Store + CODE_SIGNING_REQUIRED = YES + XCCONFIG - # Build Flutter (no codesign — signing happens in xcodebuild archive) - flutter build ios --release --no-codesign - - # Archive with manual signing scoped only to Runner target xcodebuild archive \ -workspace ios/Runner.xcworkspace \ -scheme Runner \ -configuration Release \ -archivePath $RUNNER_TEMP/Runner.xcarchive \ -destination "generic/platform=iOS" \ - CODE_SIGN_STYLE="Manual" \ - DEVELOPMENT_TEAM="$TEAM_ID" \ - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]=Enaklo Owner App Store" \ - CODE_SIGN_IDENTITY="iPhone Distribution" \ - CODE_SIGNING_REQUIRED=YES \ - CODE_SIGNING_ALLOWED=YES + -xcconfig $RUNNER_TEMP/signing.xcconfig \ + DEVELOPMENT_TEAM="$TEAM_ID" - name: Export IPA run: | xcodebuild -exportArchive \ -archivePath $RUNNER_TEMP/Runner.xcarchive \ -exportPath $RUNNER_TEMP/export \ - -exportOptionsPlist ios/ExportOptions.plist \ - -allowProvisioningUpdates + -exportOptionsPlist ios/ExportOptions.plist - # Copy IPA to build output folder mkdir -p build/ios/ipa cp $RUNNER_TEMP/export/*.ipa build/ios/ipa/