refactor(fastlane): Modularize Fastfile into separate lane files#87
Merged
refactor(fastlane): Modularize Fastfile into separate lane files#87
Conversation
Split the 888-line monolithic Fastfile into a modular structure: - fastlane/Fastfile: Main entry with imports (46 lines) - fastlane/lanes/build.rb: build_ci lane - fastlane/lanes/release.rb: beta, prepare_release, deploy_beta, publish - fastlane/lanes/utilities.rb: generate_*, upload_metadata, setup_code_signing, bump_* - fastlane/lanes/helpers.rb: Private helper lanes - fastlane/lanes/sentry.rb: Sentry integration lanes - fastlane/lanes/version.rb: Version management lanes - fastlane/lanes/git.rb: Git and GitHub lanes - fastlane/actions/enable_pr_auto_merge.rb: Custom action for GitHub auto-merge Additional changes: - Add octokit gem for GitHub API interactions - Rename publish-beta-build.yml to deploy-beta.yml - Add prepare-release.yml workflow for scheduled releases - Implement idempotent deploy_beta lane (skips if build already uploaded) - Query TestFlight for next build number in prepare_release
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors Fastlane configuration by splitting a previously monolithic Fastfile into modular lane files, adds a custom Fastlane action to enable GitHub PR auto-merge, and updates CI workflows to support a prepare-release + deploy-beta flow.
Changes:
- Modularized Fastlane lanes into
fastlane/lanes/*.rband simplifiedfastlane/Fastfileimports - Added
enable_pr_auto_mergecustom action using Octokit + GitHub GraphQL API - Added
prepare-release.ymland updateddeploy-beta.ymlto support release-branch-driven beta deployments
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| fastlane/Fastfile | Replaced monolithic lane definitions with imports for modular lane files. |
| fastlane/lanes/build.rb | Defines build_ci lane for CI archives and optional Sentry upload. |
| fastlane/lanes/release.rb | Adds/defines release lanes: beta, prepare_release, deploy_beta, publish. |
| fastlane/lanes/utilities.rb | Adds utility lanes for icons, screenshots, metadata upload, code signing, and version bump lanes. |
| fastlane/lanes/helpers.rb | Extracts private helper lanes used across build/release workflows. |
| fastlane/lanes/version.rb | Adds private lanes for version/build number coordination with App Store Connect/TestFlight. |
| fastlane/lanes/sentry.rb | Adds private lanes for Sentry release creation/finalization and uploads. |
| fastlane/lanes/git.rb | Adds private lanes for PR creation, tagging, and invoking auto-merge action. |
| fastlane/actions/enable_pr_auto_merge.rb | New custom action to enable PR auto-merge via GraphQL. |
| Gemfile | Adds octokit dependency for GitHub API operations. |
| Gemfile.lock | Locks octokit and its transitive dependencies. |
| .github/workflows/prepare-release.yml | New scheduled/manual workflow to bump version/build and open a release PR. |
| .github/workflows/deploy-beta.yml | Renames/retools workflow to deploy beta on release/** pushes. |
Comments suppressed due to low confidence (1)
.github/workflows/deploy-beta.yml:10
github.job.nameis not a valid GitHub Actions context property; the job id is available asgithub.job. As written, this expression may evaluate unexpectedly (or to an empty string), which can cause unrelated runs to share the same concurrency group. Consider switching to${{ github.job }}(or remove the job component if you intentionally want a workflow-wide lock).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Run release preparation, TestFlight deployment, and main+tag push in one workflow using the release bot token, and consolidate Fastlane lane descriptions.
Normalize and validate merge_method against GitHub's allowed enum values before interpolating into the GraphQL mutation to prevent invalid requests.
Member
Author
|
Addressed the high-priority feedback about GraphQL enum interpolation in in commit . is now normalized and validated against an allowlist (, , ) before being interpolated into the GraphQL mutation. |
Drop the unused PR/auto-merge lanes and action after moving to the single release_beta_ci workflow, and remove octokit dependency.
Call _setup_code_signing before _build_app_for_store in publish so manual signing profiles are available during archive export.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
enable_pr_auto_mergeaction for GitHub auto-merge via GraphQL APIdeploy_betalane that skips upload if build already exists on TestFlightChanges
New Structure
Workflow Changes
publish-beta-build.yml→deploy-beta.ymlprepare-release.ymlworkflow for scheduled/manual releasesprepare_releasequeries TestFlight for next build number upfrontdeploy_betachecks if build exists before uploading (idempotent, safe to re-run)Dependencies
octokitgem for GitHub API interactionsTest Plan
bundle exec fastlane lanesshows all 12 public lanesbundle exec fastlane action enable_pr_auto_mergeshows custom action docs