Skip to content

Commit 4906b2d

Browse files
committed
upload to test flight internally distrivution
1 parent 39e778e commit 4906b2d

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/nightly-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ jobs:
141141
"github_actions_main-exp" \
142142
"${{ github.ref_name }}" \
143143
"${{ steps.ipa.outputs.path }}" \
144-
"MetaMask BETA & Release Candidates"
144+
"MetaMask BETA & Release Candidates" \
145+
"false"
145146
146147
- name: Cleanup API Key
147148
if: always()
@@ -200,7 +201,8 @@ jobs:
200201
"github_actions_main-rc" \
201202
"${{ github.ref_name }}" \
202203
"${{ steps.ipa.outputs.path }}" \
203-
"MetaMask BETA & Release Candidates"
204+
"MetaMask BETA & Release Candidates" \
205+
"false"
204206
205207
- name: Cleanup API Key
206208
if: always()

ios/fastlane/Fastfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ platform :ios do
2020
# Convert groups parameter to array (Fastlane CLI passes strings, not arrays)
2121
groups_param = options[:groups] || ['MetaMask BETA & Release Candidates']
2222
groups = groups_param.is_a?(Array) ? groups_param : [groups_param]
23-
notify_external_testers = true
23+
distribute_external = options[:distribute_external].nil? ? true : options[:distribute_external].to_s.downcase == 'true'
24+
notify_external_testers = distribute_external
2425

2526
if ipa_path.nil? || ipa_path.empty?
2627
UI.user_error!("You must provide an ipa_path using ipa_path: '/path/to/app.ipa'")
@@ -96,7 +97,7 @@ platform :ios do
9697
upload_to_testflight(
9798
api_key: api_key,
9899
ipa: ipa_path,
99-
distribute_external: true,
100+
distribute_external: distribute_external,
100101
groups: groups,
101102
notify_external_testers: notify_external_testers,
102103
changelog: changelog_message

scripts/upload-to-testflight.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
# This script can be used in both Bitrise and GitHub Actions workflows
55
#
66
# Usage:
7-
# ./scripts/upload-to-testflight.sh <pipeline_name> <branch> [ipa_path] [testflight_group]
7+
# ./scripts/upload-to-testflight.sh <pipeline_name> <branch> [ipa_path] [testflight_group] [distribute_external]
88
#
99
# Arguments:
10-
# pipeline_name - Pipeline or workflow name (required)
11-
# branch - Git branch name (required)
12-
# ipa_path - Optional: Direct path to IPA file (if not provided, uses find-ipa-file.sh)
13-
# testflight_group - Optional: TestFlight external testing group name (default: MetaMask BETA & Release Candidates)
10+
# pipeline_name - Pipeline or workflow name (required)
11+
# branch - Git branch name (required)
12+
# ipa_path - Optional: Direct path to IPA file (if not provided, uses find-ipa-file.sh)
13+
# testflight_group - Optional: TestFlight external testing group name (default: MetaMask BETA & Release Candidates)
14+
# distribute_external - Optional: Whether to distribute to external testers (default: true)
1415
#
1516
# Environment variables:
1617
# IPA_PATH - IPA path (set by find-ipa-file.sh if not provided as argument)
@@ -27,6 +28,7 @@ PIPELINE_NAME="$1"
2728
BRANCH="$2"
2829
LOCAL_IPA_PATH="$3"
2930
TESTFLIGHT_GROUP="${4:-MetaMask BETA & Release Candidates}"
31+
DISTRIBUTE_EXTERNAL="${5:-true}"
3032

3133
# Get IPA path: use argument if provided, otherwise use find-ipa-file.sh
3234
if [ -n "$LOCAL_IPA_PATH" ]; then
@@ -74,5 +76,6 @@ cd ios
7476
bundle exec fastlane upload_to_testflight_only \
7577
ipa_path:"$IPA_PATH" \
7678
groups:"$TESTFLIGHT_GROUP" \
77-
changelog:"$CHANGELOG"
79+
changelog:"$CHANGELOG" \
80+
distribute_external:"$DISTRIBUTE_EXTERNAL"
7881

0 commit comments

Comments
 (0)