用途
本技能用于将 Expo SDK 57 应用构建并发布到 iOS App Store、Google Play Store 和 TestFlight,基于 EAS(Expo Application Services)完成。若需将 Expo 网站或 Expo Router API 路由部署到 EAS Hosting(npx expo export -p web 后 eas deploy),应使用 eas-hosting 技能;本技能聚焦原生应用商店发布。
费用与前提
EAS 为付费产品,含免费额度限制。eas build 和 eas submit 会消耗套餐的构建分钟数,商店提交还需要付费的 Apple Developer 和 Google Play 账号。运行云端命令前请查阅 https://expo.dev/pricing。
主要能力
- 使用 EAS 构建并发布 Expo 应用到 iOS App Store、Google Play Store 和 TestFlight。
- 提供 CI/CD 工作流,用于自动化商店发布与 PR 预览(见 ./references/workflows.md)。
- 支持将 iOS 构建提交到 TestFlight 进行 Beta 测试(见 ./references/testflight.md)。
- 管理 App Store 元数据与 ASO 优化(见 ./references/app-store-metadata.md)。
- 提交 Android 构建到 Google Play Store(见 ./references/play-store.md)。
- iOS App Store 提交与审核流程(见 ./references/ios-app-store.md)。
使用方式
安装 EAS CLI 并登录:
npm install -g eas-cli
eas login
初始化 EAS:
npx eas-cli@latest init
该命令会创建包含构建配置文件的 eas.json。
生产构建:
# 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"
}
}
}
}
平台专属流程:
- 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 流水线,用于 CI/CD,商店发布示例见 ./references/workflows.md。编写或校验工作流 YAML 请使用 eas-workflows 技能,它基于实时工作流 schema。
版本管理:使用 appVersionSource: "remote" 时 EAS 自动管理版本号。
# 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
适用场景
需要将 Expo SDK 57 原生应用发布到 iOS App Store、Google Play Store 或 TestFlight 的团队与开发者,尤其是希望通过 EAS 实现构建、提交与自动化 CI/CD 发布流程的场景。
限制
EAS 为付费服务,构建与提交消耗套餐构建分钟数,商店提交需付费的 Apple Developer 与 Google Play 账号。本技能不覆盖 Expo 网站或 API 路由的 EAS Hosting 部署(由 eas-hosting 技能负责)。
反馈
如遇错误或过时信息,可提交反馈:
npx --yes submit-expo-feedback@latest --category skills --subject "eas-app-stores" "<actionable feedback>"
仅在确有具体可操作内容时提交,并尽量附上相关上下文。若 AI 代理反复失败或用户不得不接管 Expo 任务,请加载 expo-skill-feedback 技能并按其 eval-candidate 流程处理,而非重复使用上述命令。