2424 type : boolean
2525 description : Assign the build to the "QA Team" TestFlight group after submitting
2626 default : false
27- releaseNotes :
28- type : string
29- description : Notes to set as the TestFlight "What to Test" changelog
30- required : false
31- default : ' '
3227 outputs :
3328 package-version :
3429 description : Version from package.json
@@ -216,7 +211,6 @@ jobs:
216211 # eas submit only uploads to App Store Connect; it can't assign a build to a
217212 # TestFlight group. fastlane's distribute_only mode skips the upload and assigns the
218213 # already-submitted build to the group, polling until Apple finishes processing it.
219- # The "What to Test" changelog is supplied by the caller (e.g. the nightly workflow).
220214 - name : 🧪 Assign build to TestFlight group
221215 if : ${{ inputs.assignTestFlightGroup }}
222216 env :
@@ -225,26 +219,30 @@ jobs:
225219 ASC_KEY_P8_BASE64 : ${{ secrets.ASC_KEY_P8_BASE64 }}
226220 APP_VERSION : ${{ steps.get-build-info.outputs.PACKAGE_VERSION }}
227221 BUILD_NUMBER : ${{ steps.ipa-build-number.outputs.build-number }}
228- RELEASE_NOTES : ${{ inputs.releaseNotes }}
229222 run : |
230223 # Ensure the API key material is removed even if fastlane exits non-zero
231224 # (the step runs under `bash -e`, which would otherwise abort before cleanup).
232- trap 'rm -f asc_api_key.p8 asc_api_key.json' EXIT
233- echo "$ASC_KEY_P8_BASE64" | base64 --decode > asc_api_key.p8
234- printf '{"key_id":"%s","issuer_id":"%s","key_filepath":"%s","in_house":false}' \
235- "$ASC_KEY_ID" "$ASC_ISSUER_ID" "$PWD/asc_api_key.p8" > asc_api_key.json
236- changelog_args=()
237- if [ -n "$RELEASE_NOTES" ]; then
238- changelog_args=(changelog:"$RELEASE_NOTES")
239- fi
225+ trap 'rm -f asc_api_key.json' EXIT
226+ # fastlane's Token.from_json_file expects the .p8 contents inline under "key"
227+ # (PEM with embedded newlines), not a path. jq handles the newline escaping.
228+ key_content="$(echo "$ASC_KEY_P8_BASE64" | base64 --decode)"
229+ jq -n \
230+ --arg key_id "$ASC_KEY_ID" \
231+ --arg issuer_id "$ASC_ISSUER_ID" \
232+ --arg key "$key_content" \
233+ '{key_id: $key_id, issuer_id: $issuer_id, key: $key, in_house: false}' \
234+ > asc_api_key.json
235+ # app_platform is required in non-interactive mode: distribute_only otherwise
236+ # calls fetch_app_platform, which prompts for input and crashes without a TTY.
240237 fastlane run upload_to_testflight \
241238 api_key_path:"$PWD/asc_api_key.json" \
242239 distribute_only:true \
240+ app_platform:"ios" \
243241 app_identifier:"xyz.blueskyweb.app" \
244242 app_version:"$APP_VERSION" \
245243 build_number:"$BUILD_NUMBER" \
246- "${changelog_args[@]} " \
247- groups:"QA Team"
244+ groups:"QA Team " \
245+ notify_external_testers:true
248246
249247 - name : 🔔 Notify Slack of Production Build
250248 if : ${{ inputs.profile == 'production' }}
0 commit comments