Commit 2bcd74c
authored
ci: split build artifacts and fix testflight upload for runway (#27766)
---
## **Description**
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
This PR makes two related CI improvements to support Runway and
downstream artifact consumers:
**1. Split artifact uploads into separate named artifacts**
Previously, iOS device builds uploaded both the IPA and xcarchive under
a single artifact name (`ios-<build_name>`), and Android release builds
uploaded both APK and AAB under `android-<build_name>`. This made it
impossible for tools like Runway to select a specific file type by
artifact name.
Each file type now gets its own distinctly-named artifact:
- `ios-app-<build_name>` — iOS simulator `.app.zip`
- `ios-ipa-<build_name>` — iOS device `.ipa`
- `ios-xcarchive-<build_name>` — iOS `.xcarchive.zip`
- `android-apk-<build_name>` — Android APK
- `android-aab-<build_name>` — Android AAB
**2. Zip xcarchive into a single file**
`.xcarchive` is a directory, not a file. `rename-artifacts.js` now zips
it with `ditto` into a `.xcarchive.zip` single-file artifact, which is
what Runway and other upload tools expect.
**3. Fix TestFlight Fastlane upload for Developer role API keys**
When `distribute_external` is `false`, the Fastlane lane now sets
`skip_submission: true`. Without this, `upload_to_testflight` makes
TestFlight management API calls that require an App Manager (or higher)
role — a Developer role API key (used for nightly builds) can upload
binaries but cannot manage distribution. This fixes authentication
failures on nightly uploads.
**4. Downstream workflow updates**
`nightly-build.yml` and `upload-to-testflight.yml` are updated to
reference the new `ios-ipa-<build_name>` artifact name, and the
redundant `"false"` positional argument for `distribute_external` is
removed (now handled inside the Fastlane lane).
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
N/A — these are CI/build pipeline and Fastlane changes only.
Verification requires triggering a full build workflow and confirming:
1. GitHub Actions artifacts are uploaded under the new split names.
2. Nightly builds successfully upload to TestFlight without
authentication errors.
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
N/A
### **After**
N/A
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- Generated with the help of the pr-description AI skill -->
Made with [Cursor](https://cursor.com)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Medium risk because it changes GitHub Actions artifact
naming/packaging and TestFlight upload options, which can break
downstream CI consumers and release uploads if misconfigured.
>
> **Overview**
> **Build artifacts are now uploaded as separate, type-specific
artifacts** instead of bundling multiple outputs under `ios-*` /
`android-*`, enabling downstream tools to target `ios-app-*`,
`ios-ipa-*`, `ios-xcarchive-*`, `android-apk-*`, and `android-aab-*`
independently.
>
> **iOS device builds now zip `.xcarchive` directories** in
`scripts/rename-artifacts.js` (outputting a `.xcarchive.zip`) and
workflows are updated to upload/download the new artifact names (notably
for nightly and manual TestFlight uploads).
>
> **TestFlight upload behavior is adjusted in `ios/fastlane/Fastfile`**
so when `distribute_external` is false it sets `skip_submission: true`,
avoiding App Store Connect management calls that require
higher-privilege API keys; corresponding workflows remove the extra `
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a6e0abf. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 5bd79a8 commit 2bcd74c
5 files changed
Lines changed: 64 additions & 38 deletions
File tree
- .github/workflows
- ios/fastlane
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
354 | 360 | | |
355 | 361 | | |
356 | 362 | | |
| |||
361 | 367 | | |
362 | 368 | | |
363 | 369 | | |
364 | | - | |
365 | | - | |
| 370 | + | |
| 371 | + | |
366 | 372 | | |
367 | 373 | | |
368 | 374 | | |
369 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
370 | 385 | | |
371 | 386 | | |
372 | 387 | | |
373 | | - | |
374 | | - | |
| 388 | + | |
375 | 389 | | |
376 | 390 | | |
377 | 391 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 392 | + | |
| 393 | + | |
382 | 394 | | |
383 | 395 | | |
384 | | - | |
385 | 396 | | |
386 | 397 | | |
387 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
| 144 | + | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
| |||
168 | 167 | | |
169 | 168 | | |
170 | 169 | | |
171 | | - | |
| 170 | + | |
172 | 171 | | |
173 | 172 | | |
174 | | - | |
| 173 | + | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
206 | | - | |
207 | | - | |
| 205 | + | |
208 | 206 | | |
209 | 207 | | |
210 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
105 | 119 | | |
106 | 120 | | |
107 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
254 | | - | |
| 256 | + | |
255 | 257 | | |
256 | | - | |
| 258 | + | |
257 | 259 | | |
258 | | - | |
259 | | - | |
260 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
| |||
0 commit comments