fastlane
$ fastlane 社区开源 高风险fastlane 通过 Ruby Fastfile 编排 iOS 与 Android 的构建、证书签名(match)、截图及应用商店发布(deliver、supply)。尽管在原生移动端 CI 中不可或缺,但较重的 Ruby 依赖、交互式提示与 Apple/Google 鉴权使其对自主 Agent 不够轻量。
brew install fastlane fastlane 深度绑定本地 Xcode/Gradle 工具链与钥匙串签名(match),无法通过远程 MCP 服务替代。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
输出为非结构化的彩色 Ruby 日志,缺乏 --json 输出,且未设置 CI=true 或 FASTLANE_* 环境变量时容易卡在交互提示。
- No native
--jsonoutput across lanes or actions - Interactive prompts appear if required lane variables are missing
match --readonly 与 App Store Connect API 密钥有助于收敛风险,但未加限制的任务可能吊销证书或误提审应用。
--readonlyprevents certificate/profile mutation inmatch- Touchpoints with Apple Keychain and store submissions carry high blast radius
Ruby/Bundler 依赖冲突及 iOS 构建强依赖 macOS Xcode,导致环境搭建阻力较大。
- Requires Ruby/Bundler (
bundle exec fastlane) and Xcode on macOS for iOS
原生 iOS/Android 签名与商店发布自动化领域久经考验的事实标准。
- Rich ecosystem of built-in actions (
match,gym,pilot,supply)
长期维持 MIT 开源的社区项目(fastlane/fastlane),持续跟进 Xcode 与商店 API 变更。
- Active GitHub releases tracking Xcode and App Store Connect API updates
docs.fastlane.tools 文档体系完备,且支持 fastlane action <name> 本地查询。
- Official docs and local
fastlane actionreference
安全边界、鉴权与放权指南
读取 App Store Connect API 密钥(APP_STORE_CONNECT_API_KEY)、Google Play JSON 服务账号文件、macOS 钥匙串或 FASTLANE_* 环境变量。
CLI 开源免费(MIT);上架分发需自行购买 Apple Developer($99/年)与 Google Play($25 一次性)账号。
# fastlane Agent Rules - Set `FASTLANE_DISABLE_COLORS=1` and `CI=true` to suppress interactive prompts in autonomous runs. - Always pass `--readonly` to `fastlane match` so agents never regenerate or revoke Apple certificates. - Require explicit human approval before running store upload lanes (`deliver`, `pilot`, `supply`).
Agent 高频安全命令配方
只读查询(安全推荐)
fastlane lanes
解析本地 Fastfile 并打印可用的 iOS/Android 发布任务与说明。
fastlane action deliver
在本地展示 deliver 等内置 Action 的参数列表与环境变量映射。
受控写入与预演
fastlane match appstore --readonly
拉取现有 iOS 签名证书与描述文件,不创建或吊销任何证书。
核心优势
- + 在 iOS/Android 证书管理(
match)、构建(gym)与商店上传方面极为成熟。 - +
fastlane match --readonly与 App Store Connect API 密钥适合在 CI 中安全校验签名。 - + 文档详尽且内置
fastlane action参数自检。
注意事项与踩坑点
- ! Ruby/Bundler/Xcode 工具链耦合度高,容易出现环境配置故障。
- ! 缺少结构化
--json输出,且未显式开启CI=true时容易弹出交互式询问。