1616 - name : Set up Flutter
1717 uses : subosito/flutter-action@v2
1818 with :
19- cache : false # TODO set to <true> after https://github.com/actions/runner/issues/449 is fixed
19+ cache : false
2020 flutter-version-file : pubspec.yaml
2121
2222 - name : Update Podfile
@@ -26,20 +26,29 @@ runs:
2626 flutter pub get
2727 pod install --repo-update
2828
29- - name : Build iOS IPA (No code signing for PRs)
29+ - name : Build Unsigned iOS App (For PRs)
3030 if : ${{ github.event_name == 'pull_request' }}
3131 shell : bash
3232 env :
3333 VERSION_NAME : ${{ inputs.VERSION_NAME }}
3434 VERSION_CODE : ${{ inputs.VERSION_CODE }}
3535 run : |
36- flutter build ipa --no-codesign --build-name $VERSION_NAME --build-number $VERSION_CODE
36+ # 1. Build the raw iOS binary (Note: using 'ios', not 'ipa')
37+ flutter build ios --release --no-codesign --build-name "$VERSION_NAME" --build-number "$VERSION_CODE"
3738
38- - name : Build iOS IPA (With Code Signing)
39+ # 2. Package it into an unsigned .ipa manually
40+ cd build/ios/iphoneos
41+ mkdir Payload
42+ cp -r Runner.app Payload/
43+ zip -qr pslab-unsigned.ipa Payload/
44+ mv pslab-unsigned.ipa ../../../
45+
46+ - name : Build Signed iOS IPA (For Production)
3947 if : ${{ github.event_name != 'pull_request' }}
4048 shell : bash
4149 env :
4250 VERSION_NAME : ${{ inputs.VERSION_NAME }}
4351 VERSION_CODE : ${{ inputs.VERSION_CODE }}
4452 run : |
45- flutter build ipa --build-name $VERSION_NAME --build-number $VERSION_CODE
53+ # This will only succeed if the FOSSASIA repository certificates are present
54+ flutter build ipa --build-name "$VERSION_NAME" --build-number "$VERSION_CODE"
0 commit comments