File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -632,7 +632,32 @@ jobs:
632632 exit 1
633633 fi
634634 cd apps/ui
635- npx --yes eas-cli@18.0.1 submit --platform "${{ inputs.expo_platform }}" --latest --non-interactive
635+ submit_platform() {
636+ local platform="$1"
637+ npx --yes eas-cli@18.0.1 submit --platform "${platform}" --latest --non-interactive
638+ }
639+
640+ if [ "${{ inputs.expo_platform }}" = "all" ]; then
641+ submit_failures=0
642+ for submit_platform_name in ios android; do
643+ if ! submit_platform "${submit_platform_name}"; then
644+ if [ "${{ inputs.environment }}" = "preview" ]; then
645+ echo "::warning::Expo submit failed for \${submit_platform_name} in preview; continuing so successful platform submissions are preserved."
646+ submit_failures=1
647+ continue
648+ fi
649+ echo "Expo submit failed for platform '\${submit_platform_name}' in production." >&2
650+ exit 1
651+ fi
652+ done
653+
654+ if [ "${submit_failures}" -eq 1 ]; then
655+ echo "Preview submission completed with one or more platform failures." >> "$GITHUB_STEP_SUMMARY"
656+ fi
657+ exit 0
658+ fi
659+
660+ submit_platform "${{ inputs.expo_platform }}"
636661
637662 - name : Promote source ref to deploy branch (web)
638663 if : inputs.deploy_web
Original file line number Diff line number Diff line change @@ -114,3 +114,11 @@ test('publish-github-release skips asset upload when rolling tag move is blocked
114114 'asset upload must be gated by rolling tag success when using rolling releases' ,
115115 ) ;
116116} ) ;
117+
118+ test ( 'promote-ui native_submit handles preview platform credential gaps without aborting all submissions' , async ( ) => {
119+ const raw = await loadWorkflow ( 'promote-ui.yml' ) ;
120+ assert . match ( raw , / - n a m e : E x p o s u b m i t [ \s \S ] * ?s u b m i t _ p l a t f o r m \( \) \{ / ) ;
121+ assert . match ( raw , / f o r s u b m i t _ p l a t f o r m _ n a m e i n i o s a n d r o i d ; d o / ) ;
122+ assert . match ( raw , / i f \[ " \$ \{ \{ i n p u t s \. e n v i r o n m e n t \} \} " = " p r e v i e w " \] ; t h e n / ) ;
123+ assert . match ( raw , / : : w a r n i n g : : E x p o s u b m i t f a i l e d f o r / ) ;
124+ } ) ;
You can’t perform that action at this time.
0 commit comments