Skip to content

CI: tag-driven TestFlight release pipeline (iOS + tvOS) - #31

Merged
zZebrahz merged 9 commits into
mainfrom
chore/ci-release-pipeline
Jun 30, 2026
Merged

zZebrahz merged 9 commits into
mainfrom
chore/ci-release-pipeline

Conversation

@zZebrahz

@zZebrahz zZebrahz commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

A GitHub Actions TestFlight release pipeline for the iOS + tvOS apps, driving the existing Fastlane lanes. Builds are deliberate and tag-driven — merges to main build nothing.

Trigger model

Event Marketing version Distribution
Tag v1.4.0 1.4.0 external groups, auto-notify
Tag v1.4.0-beta.2 1.4.0 (suffix stripped) external groups, auto-notify
Manual workflow_dispatch from input external groups, auto-notify

iOS job runs before tvOS (needs: ios); a concurrency group serializes releases so the per-platform build-number auto-increment can't race.

Versioning

  • Marketing version is derived from the git tag and injected via xcargs — the tag is the release version, no drift. project.yml's 0.1.0 stays as a local-dev default.
  • Build number unchanged: existing per-platform latest_testflight_build_number + 1.

Runner reproducibility (bare, ephemeral hosted runners)

  • Pinned Xcode 26.3 (verified against the macos-15 runner image), pinned xcodegen 2.43.0, committed Gemfile.lock + .ruby-version (3.2.9) so ruby/setup-ruby resolves correctly.

Cleanup

  • Deleted the orphaned strip-ffmpeg-framework-signatures.sh (wired into nothing).
  • The FFmpeg modulemap patch is intentionally kept (Libavutil is a downloaded binaryTarget — nothing to fix once).

Security

  • The version-resolve step uses env-var intermediaries (no ${{ }} interpolated into shell) to avoid injection. Nothing identifying is hardcoded — all inputs come from repository secrets.

Before this can run (manual, credential-bound)

  • Populate the private silo-certs match repo locally (fastlane match … --readonly false)
  • Set the 8 repository secrets (see docs/release/ci-release.md)
  • Then validate via Actions → "TestFlight Release" → Run workflow → 1.4.0

Full operator docs: docs/release/ci-release.md.

Summary by CodeRabbit

  • New Features

    • Added a streamlined TestFlight release flow for iOS and tvOS, with support for both tag-based and manual versioned releases.
    • Release versions are now derived consistently across platforms during CI builds.
  • Documentation

    • Added a release guide covering how to trigger releases and what credentials are required.
  • Bug Fixes

    • Improved version handling so app builds use the expected marketing version during release automation.

zZebrahz added 8 commits June 29, 2026 21:49
Pass github.event_name, github.ref_name, and inputs.version through the
step env: block instead of interpolating \${{ }} directly into the run:
shell body. GitHub expands expressions before the shell runs, so single
quotes offered no protection. Also switch GITHUB_OUTPUT writes to the
heredoc-delimiter form (value<<EOF) for robust output handling.

Applies to both ios and tvos jobs.
@coderabbitai

coderabbitai Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@zZebrahz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 27d1c268-7efb-436f-9a59-1f7df819f4b3

📥 Commits

Reviewing files that changed from the base of the PR and between f057285 and f087fde.

📒 Files selected for processing (4)
  • .github/workflows/release.yml
  • fastlane/Fastfile
  • scripts/ci/resolve-marketing-version.sh
  • scripts/ci/resolve-marketing-version.test.sh
📝 Walkthrough

Walkthrough

Adds a TestFlight Release GitHub Actions workflow triggered by v* tag pushes or manual dispatch. A new resolve-marketing-version.sh script normalizes the version from the trigger; its output is injected into xcodebuild via a new marketing_version_xcarg helper in the Fastfile. The workflow runs iOS then tvOS jobs sequentially, uploading both to TestFlight. A deleted signature-stripping script, a pinned .ruby-version, and a release guide doc accompany these changes.

Changes

TestFlight Release Pipeline

Layer / File(s) Summary
Marketing version resolution script and tests
scripts/ci/resolve-marketing-version.sh, scripts/ci/resolve-marketing-version.test.sh
resolve-marketing-version.sh strips leading v and pre-release suffixes from tag refs, passes workflow_dispatch inputs through verbatim, and exits non-zero on empty results. The test script asserts correct output for final, prerelease, rc tags and dispatch input, and confirms empty push input is rejected.
MARKETING_VERSION injection in Fastfile
fastlane/Fastfile
Adds marketing_version_xcarg helper returning a MARKETING_VERSION=<value> xcarg fragment or empty string. Prepends it to xcargs in both beta_ios and beta_tvos build_app calls.
GitHub Actions release workflow
.github/workflows/release.yml, .ruby-version
Defines TestFlight Release workflow with v* tag and workflow_dispatch triggers, a cancel-in-progress: false concurrency lock, and pinned env vars. The ios job resolves the marketing version and runs fastlane ios beta_ios; the tvos job runs after ios and runs fastlane ios beta_tvos, both passing secrets for signing and App Store Connect. .ruby-version pins Ruby to 3.2.9.
CI release documentation and removed script
docs/release/ci-release.md, iosApp/scripts/strip-ffmpeg-framework-signatures.sh
Adds a release guide covering trigger patterns, versioning, required secrets, and signing asset renewal. Removes the FFmpeg signature-stripping script.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the new tag-driven TestFlight release pipeline for iOS and tvOS.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ci-release-pipeline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f057285733

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fastlane/Fastfile Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/release/ci-release.md (1)

12-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add blank lines around the secrets table.

The table is missing a blank line before it (line 12 heading directly precedes line 13 table). This triggers markdownlint MD058.

  ## Required repository secrets
+
  | Secret | Purpose |
  |---|---|
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/release/ci-release.md` around lines 12 - 22, The required repository
secrets table is missing surrounding blank lines, causing the markdownlint MD058
violation. Update the docs/release/ci-release.md content so the section heading
and the table in the required repository secrets area are separated by an empty
line before and after the table, keeping the existing table content intact.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 19-22: The release workflow is hard-coding TestFlight to external
distribution, which overrides the lane’s intended default behavior. Update the
workflow’s env setup in the release job to stop setting TESTFLIGHT_DISTRIBUTION
to external; instead derive it from the release ref/input or leave it unset so
the Fastlane lane default can control distribution. Keep the existing workflow
symbols like env, TESTFLIGHT_DISTRIBUTION, and
TESTFLIGHT_NOTIFY_EXTERNAL_TESTERS as the places to adjust.
- Around line 13-17: The release workflow is missing an explicit permissions
block, so the jobs inherit broader default GITHUB_TOKEN scope than needed. Add a
workflow-level permissions declaration in the release workflow and set the token
to the minimum required, using the workflow’s existing structure around the
concurrency section so it still serializes releases while only allowing read
access to repository contents for checkout.

In `@fastlane/Fastfile`:
- Around line 65-67: The marketing_version_xcarg helper is directly
interpolating ENV["MARKETING_VERSION"] into xcodebuild arguments, so validate
that value before returning the xcargs fragment. Update marketing_version_xcarg
to only accept the expected dotted-number format and reject any input containing
spaces or extra build-setting tokens, so a manual dispatch value cannot inject
additional xcodebuild settings. Use the existing marketing_version_xcarg method
as the single place to sanitize the MARKETING_VERSION input before it is
appended to xcargs.

---

Nitpick comments:
In `@docs/release/ci-release.md`:
- Around line 12-22: The required repository secrets table is missing
surrounding blank lines, causing the markdownlint MD058 violation. Update the
docs/release/ci-release.md content so the section heading and the table in the
required repository secrets area are separated by an empty line before and after
the table, keeping the existing table content intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a6c07d2f-69fb-4325-a8a2-4f028ab8f07a

📥 Commits

Reviewing files that changed from the base of the PR and between c48b2cc and f057285.

⛔ Files ignored due to path filters (1)
  • Gemfile.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • .github/workflows/release.yml
  • .ruby-version
  • docs/release/ci-release.md
  • fastlane/Fastfile
  • iosApp/scripts/strip-ffmpeg-framework-signatures.sh
  • scripts/ci/resolve-marketing-version.sh
  • scripts/ci/resolve-marketing-version.test.sh
💤 Files with no reviewable changes (1)
  • iosApp/scripts/strip-ffmpeg-framework-signatures.sh

Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
Comment thread fastlane/Fastfile Resolved
@zZebrahz
zZebrahz merged commit cce652a into main Jun 30, 2026
1 check passed
@zZebrahz
zZebrahz deleted the chore/ci-release-pipeline branch June 30, 2026 05:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f087fdecb4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fastlane/Fastfile
# a global value would override both targets with the same profile.
# Per-target settings were written above via update_code_signing_settings.
xcargs: "CODE_SIGN_STYLE=Manual " \
xcargs: "#{marketing_version_xcarg}" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Sync the Top Shelf extension version

When the tvOS lane runs for any release version other than 0.1.0, this new global MARKETING_VERSION only affects targets whose plist references $(MARKETING_VERSION). The host tvOS app does, but iosApp/TopShelf/Info.plist hard-codes CFBundleShortVersionString to 0.1.0, so the embedded .appex is packaged with a different short version and App Store Connect rejects the tvOS upload with a bundle-version mismatch. Make the extension plist use the same build settings before enabling this override.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant