Skip to content

Commit 9298e1c

Browse files
committed
add upload to TestFlight job
1 parent 9873c5d commit 9298e1c

1 file changed

Lines changed: 84 additions & 1 deletion

File tree

.github/workflows/runway_ios_rc_workflow.yml

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Triggered from Runway to either:
66
# - Push an OTA update (when OTA_VERSION in app/constants/ota.ts line 9 is bumped), or
7-
# - Build the mobile app (when there is no OTA version bump).
7+
# - Build the mobile app and upload the IPA to TestFlight (when there is no OTA version bump).
88
#
99
# When triggering workflow_dispatch, select the release branch (e.g. release/7.71.0).
1010
#
@@ -146,3 +146,86 @@ jobs:
146146
skip_version_bump: false
147147
ref: ${{ inputs.ref || github.ref_name }}
148148
secrets: inherit
149+
150+
testflight-upload-summary:
151+
name: TestFlight upload summary
152+
needs: [trigger-build]
153+
runs-on: ubuntu-latest
154+
steps:
155+
- uses: actions/checkout@v4
156+
with:
157+
fetch-depth: 0
158+
ref: ${{ inputs.ref || github.ref_name }}
159+
- name: Display TestFlight upload summary
160+
run: |
161+
BUILD_VERSION=$(node -p "require('./package.json').version")
162+
{
163+
echo "### 📲 TestFlight Upload (Runway iOS RC)"
164+
echo ""
165+
echo "| Field | Value |"
166+
echo "| --- | --- |"
167+
echo "| **Ref** | ${{ inputs.ref || github.ref_name }} |"
168+
echo "| **Build name** | main-rc |"
169+
echo "| **Build version** | ${BUILD_VERSION} |"
170+
echo "| **TestFlight group** | MetaMask BETA & Release Candidates |"
171+
} >> "$GITHUB_STEP_SUMMARY"
172+
173+
upload-ios-testflight:
174+
name: Upload iOS to TestFlight
175+
needs: [trigger-build, testflight-upload-summary]
176+
runs-on: ghcr.io/cirruslabs/macos-runner:sequoia-xl
177+
environment: apple
178+
steps:
179+
- name: Checkout repository
180+
uses: actions/checkout@v4
181+
with:
182+
fetch-depth: 0
183+
ref: ${{ inputs.ref || github.ref_name }}
184+
185+
- name: Setup Ruby (iOS)
186+
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb #v1
187+
with:
188+
ruby-version: '3.2.9'
189+
working-directory: ios
190+
bundler-cache: true
191+
192+
- name: Download iOS build artifact
193+
uses: actions/download-artifact@v4
194+
with:
195+
name: ios-main-rc
196+
197+
- name: Find IPA path
198+
id: ipa
199+
run: |
200+
IPA=$(find . -name '*.ipa' -type f | head -1)
201+
if [ -z "$IPA" ]; then
202+
echo "::error::No .ipa file found in artifact"
203+
exit 1
204+
fi
205+
case "$IPA" in /*) ABS="$IPA" ;; *) ABS="$PWD/$IPA" ;; esac
206+
echo "path=$ABS" >> "$GITHUB_OUTPUT"
207+
208+
- name: Setup App Store Connect API Key
209+
run: |
210+
bash scripts/setup-app-store-connect-api-key.sh \
211+
"$APP_STORE_CONNECT_API_KEY_ISSUER_ID" \
212+
"$APP_STORE_CONNECT_API_KEY_KEY_ID" \
213+
"$APP_STORE_CONNECT_API_KEY_KEY_CONTENT"
214+
env:
215+
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
216+
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
217+
APP_STORE_CONNECT_API_KEY_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_CONTENT }}
218+
219+
- name: Upload to TestFlight
220+
run: |
221+
bash scripts/upload-to-testflight.sh \
222+
"github_actions_main-rc" \
223+
"${{ inputs.ref || github.ref_name }}" \
224+
"${{ steps.ipa.outputs.path }}" \
225+
"MetaMask BETA & Release Candidates"
226+
227+
- name: Cleanup API Key
228+
if: always()
229+
run: |
230+
rm -f ios/AuthKey.p8
231+
echo "🧹 Cleaned up API key file"

0 commit comments

Comments
 (0)