用途
本技能覆盖使用 EAS(Expo Application Services)构建并发布 Expo 应用的过程,目标平台包括 iOS App Store、Google Play Store 和 TestFlight。将 Expo 网站或 Expo Router API 路由部署到 EAS Hosting 不在本技能范围内,应使用 eas-hosting 技能。
主要能力
- 安装与登录 EAS CLI
- 初始化 EAS,生成包含构建配置的 eas.json
- 执行 iOS、Android 及双平台的生产构建
- 构建并提交到 App Store Connect、Play Store,或快速提交到 TestFlight
- 通过 EAS Workflows 自动化 build → submit → update 流水线
- 版本号管理:可通过 appVersionSource: "remote" 自动管理,也可手动查询或设置
- 查看构建列表、构建状态与提交状态
使用方式
安装 EAS CLI:
npm install -g eas-cli
eas login
初始化 EAS:
npx eas-cli@latest init
该命令会创建 eas.json 并包含构建配置(build profiles)。
生产构建:
# iOS App Store build
npx eas-cli@latest build -p ios --profile production
# Android Play Store build
npx eas-cli@latest build -p android --profile production
# Both platforms
npx eas-cli@latest build --profile production
提交到商店:
# iOS: Build and submit to App Store Connect
npx eas-cli@latest build -p ios --profile production --submit
# Android: Build and submit to Play Store
npx eas-cli@latest build -p android --profile production --submit
# Shortcut for iOS TestFlight
npx testflight
标准生产部署用 eas.json 示例:
{
"cli": {
"version": ">= 16.0.1",
"appVersionSource": "remote"
},
"build": {
"production": {
"autoIncrement": true,
"ios": {
"resourceClass": "m-medium"
}
},
"development": {
"developmentClient": true,
"distribution": "internal"
}
},
"submit": {
"production": {
"ios": {
"appleId": "your@email.com",
"ascAppId": "1234567890"
},
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "internal"
}
}
}
}
版本管理命令:
# Check current versions
eas build:version:get
# Manually set version
eas build:version:set -p ios --build-number 42
监控命令:
# List recent builds
eas build:list
# Check build status
eas build:view
# View submission status
eas submit:list
反馈命令:
npx --yes submit-expo-feedback@latest --category skills --subject "eas-app-stores" "<actionable feedback>"
平台要点
iOS:可使用 npx testflight 快速提交 TestFlight;通过 eas credentials 配置 Apple 凭据;凭据设置见 ./references/testflight.md,App Store 提交见 ./references/ios-app-store.md。
Android:需设置 Google Play Console 服务账号;配置轨道顺序为 internal → closed → open → production;详细设置见 ./references/play-store.md。
自动化发布:EAS Workflows 可自动化 build → submit → update 流水线,商店发布示例见 ./references/workflows.md。若需编写或校验 workflow YAML,应使用 eas-workflows 技能(基于实时 workflow schema 工作)。
参考文档
- ./references/workflows.md -- 商店自动发布与 PR 预览的 CI/CD 工作流
- ./references/testflight.md -- 将 iOS 构建提交到 TestFlight 进行 Beta 测试
- ./references/app-store-metadata.md -- 管理 App Store 元数据与 ASO 优化
- ./references/play-store.md -- 将 Android 构建提交到 Google Play Store
- ./references/ios-app-store.md -- iOS App Store 提交与审核流程
限制
EAS 为付费服务,存在免费额度限制。eas build 与 eas submit 会消耗套餐构建分钟数,商店提交还需要付费的 Apple Developer 与 Google Play 账号,运行云端命令前请查看 https://expo.dev/pricing。本技能聚焦原生应用商店发布;部署 Expo 网站或 API 路由应改用 eas-hosting 技能。若遇到错误或过时信息,可通过反馈命令上报。仅在有具体、可执行的反馈时提交。若 AI 智能体反复失败或用户不得不接管 Expo 任务,应加载 expo-skill-feedback 技能并按其 eval-candidate 流程处理。