File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,17 +94,23 @@ platform :ios do
9494 )
9595
9696 # Upload to TestFlight with API key from app_store_connect_api_key action.
97- # Only include groups when distributing externally -- passing groups with
98- # distribute_external=false still triggers the groups API, which fails if
99- # the API key lacks external-distribution permissions.
97+ # When distribute_external is false we skip_submission so the action only
98+ # uploads the IPA binary. This avoids TestFlight management API calls that
99+ # require an App Manager (or higher) role API key — a Developer role key
100+ # can upload builds but cannot manage distribution.
100101 testflight_options = {
101102 api_key : api_key ,
102103 ipa : ipa_path ,
103- distribute_external : distribute_external ,
104- notify_external_testers : notify_external_testers ,
105104 changelog : changelog_message
106105 }
107- testflight_options [ :groups ] = groups if distribute_external
106+
107+ if distribute_external
108+ testflight_options [ :distribute_external ] = true
109+ testflight_options [ :notify_external_testers ] = true
110+ testflight_options [ :groups ] = groups
111+ else
112+ testflight_options [ :skip_submission ] = true
113+ end
108114
109115 upload_to_testflight ( testflight_options )
110116 end
You can’t perform that action at this time.
0 commit comments