ci(example): un-draft Play release, attach release notes, link install URL, platform-selective triggers#354
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default mode and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 031775a. Configure here.
`head -c 500` truncates by byte, not character. If the GitHub release
body has multi-byte UTF-8 (emojis, accented text) right at the
boundary, the byte-based cut can land mid-codepoint and produce
invalid UTF-8 that the Play Store API may reject.
Switch to bash parameter expansion `${RELEASE_BODY:0:500}`, which is
locale-aware (ubuntu-24.04 defaults to en_US.UTF-8) and counts whole
characters. Per Google's docs the per-locale cap is 500 characters
anyway, so character-based truncation is also semantically correct.
Reported by Cursor Bugbot on PR #354.
…l URL in Slack - `status: draft` -> `completed`. Listing has active builds on internal and closed test tracks, so non-draft submissions are now accepted. - On `release: published`, write the GitHub release body to a `whatsnew-en-US` file (truncated to Play's 500-char per-locale cap) and pass `whatsNewDirectory` so the upload action attaches release notes. Other triggers (manual / push / labeled PR) skip this and the build lands without notes. - Capture `internalSharingDownloadUrl` from the upload action — it's emitted for every non-internalsharing track, not just `internalsharing` itself, despite what the action's docstring suggests. Pass into the Slack notify action via a new `install_url` input that conditionally renders an `Install: <url>` line. Only resolvable by users already authorized for the build, so safe to ship in a public-channel message. - TestFlight side stays without an install link — `xcrun altool` doesn't emit one.
`head -c 500` truncates by byte, not character. If the GitHub release
body has multi-byte UTF-8 (emojis, accented text) right at the
boundary, the byte-based cut can land mid-codepoint and produce
invalid UTF-8 that the Play Store API may reject.
Switch to bash parameter expansion `${RELEASE_BODY:0:500}`, which is
locale-aware (ubuntu-24.04 defaults to en_US.UTF-8) and counts whole
characters. Per Google's docs the per-locale cap is 500 characters
anyway, so character-based truncation is also semantically correct.
Reported by Cursor Bugbot on PR #354.
Lets us trigger Android-only or iOS-only publishes when the other platform's job isn't relevant (e.g. iOS-only signing experiment, Android keystore rotation). - `workflow_dispatch` gains a `platform` input (`both` / `android` / `ios`, default `both`) — surfaces as a dropdown in the GitHub Actions "Run workflow" dialog. - `pull_request: labeled` now recognizes three labels: - `deploy-example-app` → both (existing behavior preserved) - `deploy-example-app:android` → Android only - `deploy-example-app:ios` → iOS only - `release: published` and `push` to master keep their existing "both platforms always run" behavior. - cleanup-label job widened to remove whichever variant was applied (`startsWith` filter, label name pulled from the event payload via env). Note: the new `:android` / `:ios` labels need to be created in the repo settings before they can be applied to PRs. GitHub auto-creates labels on first use in some flows but not for `pull_request: labeled` triggers.
f70ef00 to
f04997a
Compare
|
Solid CI improvement. A couple of non-blocking observations:
Otherwise looks great — the |

Description
Targeted improvements to the example app's Play Store + TestFlight publish workflow now that the listing is mature enough for non-draft submissions, plus tighter trigger granularity so we can publish one platform at a time when needed.
Due Diligence
Release/Versioning Considerations
PatchContains internal changes or backwards-compatible bug fixes.MinorContains changes to the public API.MajorContains breaking changes.CI-only change, no SDK API surface affected.
Changelog / Code Overview
1.
status: draft→status: completedThe listing now has active builds on internal and closed test tracks, so the per-app "Set up your app" requirements are satisfied. Non-draft submissions on the internal track now go live for testers automatically instead of sitting in the Play Console as drafts waiting for manual promotion.
2. Release notes from GitHub release body
r0adkll/upload-google-play@v1.1.3accepts awhatsNewDirectorycontainingwhatsnew-<locale>files. Onrelease: publishedevents, the workflow writes${{ github.event.release.body }}(truncated to Play's 500-char per-locale cap, character-aware via bash parameter expansion to avoid splitting multi-byte UTF-8 — caught by Cursor Bugbot, see reply) to${RUNNER_TEMP}/whatsnew/whatsnew-en-USand passes the dir to the upload action. Other triggers (manual dispatch, push to master, labeled PR) skip the prep step and the build lands without notes — those builds aren't user-facing releases anyway.3. Install URL in Slack notification
Reading the upload action's source (edits.ts:97–99), the
internalSharingDownloadUrloutput is emitted for every non-internalsharingtrack, not just for theinternalsharingtrack as the action'saction.ymldocstring suggests. The URL format ishttps://play.google.com/apps/test/<package>/<versionCode>and is only resolvable by users already authorized for the build (no enrollment leak), making it safe to post to a public Slack channel.The Deploy step now has
id: play_upload, the success-notification step passesinstall_url: ${{ steps.play_upload.outputs.internalSharingDownloadUrl }}, and thenotify-slack-publishcomposite action gained an optionalinstall_urlinput that conditionally renders anInstall: <url>line in the existing details section.4. Platform-selective triggers
Today the workflow is all-or-nothing — every trigger publishes both Android and iOS. New behavior:
workflow_dispatchplatforminput dropdown:both(default) /android/iospull_requestlabeleddeploy-example-apppull_requestlabeleddeploy-example-app:androidpull_requestlabeleddeploy-example-app:iosrelease: publishedpushto masterThe cleanup-label job widened to remove whichever variant was applied (
startsWith('deploy-example-app')filter, label name pulled from event payload via env var so dynamic).Test Plan
python3 -c 'import yaml; yaml.safe_load(...)').hé€ll→ 5 chars / 8 bytes, no mid-codepoint cut).workflow_dispatchagainst this branch withplatform: android, confirm only the Android job runs.platform: ios, confirm only the iOS job runs.platform: both, confirm both jobs run (regression check on the default path).deploy-example-app:androidlabel to a test PR, confirm only the Android job runs and the label gets removed afterward.deploy-example-app(umbrella) label still triggers both jobs (regression check).Install:line and the URL opens correctly for an enrolled tester.Related Issues/Tickets
Follow-up to MAGE-452 (Release RN v2.4.0). Depends on #353 merging first since this branches from
ecm/bump-version's tip — once #353 lands onrel/2.4.0, this diff againstrel/2.4.0reduces to just the four changes above.