expo-cicd-workflows-v55

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

EAS Workflows Skill

EAS Workflows Skill

EAS service - costs apply. EAS Workflows run on Expo Application Services, a paid product with free-tier limits. Each workflow job consumes your plan's build/compute minutes, and jobs that build or submit also need paid Apple Developer and Google Play accounts. Review https://expo.dev/pricing before triggering runs.
Help developers write and edit EAS CI/CD workflow YAML files.
EAS 服务 - 需要付费。 EAS Workflows 运行于 Expo Application Services,是一项设有免费额度限制的付费产品。每个 workflow job 都会消耗套餐所含的构建/计算分钟数,而执行构建或提交的 job 还需要付费的 Apple Developer 和 Google Play 账户。在触发运行前,请查看 https://expo.dev/pricing。
帮助开发者编写和编辑 EAS CI/CD workflow YAML 文件。

Reference Documentation

参考文档

Fetch these resources before generating or editing workflow files, or when answering syntax questions. First resolve this skill's directory, then use the fetch script in its
scripts/
directory. It is implemented using Node.js and caches responses using ETags for efficiency:
bash
undefined
在生成或编辑 workflow 文件之前,或回答语法问题时,请先获取以下资源。首先确定此 skill 的目录,然后使用其
scripts/
目录中的 fetch 脚本。该脚本使用 Node.js 实现,并通过 ETags 缓存响应以提高效率:
bash
undefined

Fetch resources

Fetch resources

node <skill-dir>/scripts/fetch.js <url>

1. **JSON Schema** — https://api.expo.dev/v2/workflows/schema
   - It is NECESSARY to fetch this schema
   - Source of truth for the workflow YAML structure; EAS CLI remains the authoritative final validator
   - All job types and their required/optional parameters
   - Trigger types and configurations
   - Runner types, VM images, and all enums

2. **Syntax Documentation** — https://raw.githubusercontent.com/expo/expo/refs/heads/main/docs/pages/eas/workflows/syntax.mdx
   - Overview of workflow YAML syntax
   - Examples and English explanations
   - Expression syntax and contexts

3. **Pre-packaged Jobs** — https://raw.githubusercontent.com/expo/expo/refs/heads/main/docs/pages/eas/workflows/pre-packaged-jobs.mdx
   - Documentation for supported pre-packaged job types
   - Job-specific parameters and outputs

Do not rely on memorized values; these resources evolve as new features are added.
node <skill-dir>/scripts/fetch.js <url>

1. **JSON Schema** — https://api.expo.dev/v2/workflows/schema
   - 必须获取此 schema
   - workflow YAML 结构的唯一事实来源;最终验证器仍以 EAS CLI 为准
   - 所有 job 类型及其必需/可选参数
   - trigger 类型和配置
   - runner 类型、VM 镜像及所有枚举值

2. **语法文档** — https://raw.githubusercontent.com/expo/expo/refs/heads/main/docs/pages/eas/workflows/syntax.mdx
   - workflow YAML 语法概览
   - 示例和英文说明
   - expression 语法及其 context

3. **预打包 Jobs** — https://raw.githubusercontent.com/expo/expo/refs/heads/main/docs/pages/eas/workflows/pre-packaged-jobs.mdx
   - 受支持的预打包 job 类型文档
   - 各 job 的专用参数和输出

不要依赖记忆中的值;随着新功能不断添加,这些资源也会持续演进。

Workflow File Location

Workflow 文件位置

Workflows live in
.eas/workflows/*.yml
(or
.yaml
). Each file must be 16 KiB or smaller.
Workflow 位于
.eas/workflows/*.yml
(或
.yaml
)中。每个文件的大小不得超过 16 KiB。

Top-Level Structure

顶层结构

A workflow file has these top-level keys:
  • name
    — Display name for the workflow
  • on
    — Triggers that start the workflow (at least one required)
  • jobs
    — Job definitions (required)
  • defaults
    — Shared defaults for all jobs
  • concurrency
    — Control parallel workflow runs
Consult the schema for the full specification of each section.
Workflow 文件包含以下顶层键:
  • name
    — Workflow 的显示名称
  • on
    — 启动 workflow 的 trigger(至少需要一个)
  • jobs
    — Job 定义(必需)
  • defaults
    — 所有 job 共用的默认值
  • concurrency
    — 控制 workflow 的并行运行
有关各部分的完整规范,请查阅 schema。

Expressions

表达式

Use
${{ }}
syntax for dynamic values. The schema defines available contexts:
  • github.*
    — GitHub repository and event information
  • inputs.*
    — Values from
    workflow_dispatch
    inputs
  • needs.*
    — Outputs and status from dependent jobs
  • jobs.*
    — Job outputs (alternative syntax)
  • steps.*
    — Step outputs within custom jobs
  • workflow.*
    — Workflow metadata
使用
${{ }}
语法表示动态值。Schema 定义了可用的 context:
  • github.*
    — GitHub 仓库和事件信息
  • inputs.*
    —
    workflow_dispatch
    inputs 中的值
  • needs.*
    — 依赖 job 的输出和状态
  • jobs.*
    — Job 输出(替代语法)
  • steps.*
    — 自定义 job 内的 step 输出
  • workflow.*
    — Workflow 元数据

Generating Workflows

生成 Workflow

When generating or editing workflows:
  1. Fetch the schema to get current job types, parameters, and allowed values
  2. Validate that required fields are present for each job type
  3. Verify job references in
    needs
    and
    after
    exist in the workflow
  4. Check that expressions reference valid contexts and outputs
  5. Ensure
    if
    conditions respect the schema's length constraints
生成或编辑 workflow 时:
  1. 获取 schema,以了解当前的 job 类型、参数和允许值
  2. 验证每种 job 类型都包含必需字段
  3. 确认 workflow 中存在
    needs
    和
    after
    引用的 job
  4. 检查 expression 是否引用了有效的 context 和 output
  5. 确保
    if
    条件符合 schema 的长度限制

Validation

验证

After generating or editing a workflow file, validate it with EAS CLI from the Expo project root:
sh
npx -y eas-cli@latest workflow:validate .eas/workflows/<workflow.yml> --non-interactive
Run the command separately for each changed workflow file. It requires a logged-in EAS CLI session and a linked Expo project. Unlike schema-only validation, it also checks build profile references against the project's
eas.json
and performs EAS server-side validation. Fix every reported error and rerun the command until it prints
Workflow configuration YAML is valid.
Do not replace this command with a local YAML or JSON Schema validator.
生成或编辑 workflow 文件后,从 Expo 项目根目录使用 EAS CLI 进行验证:
sh
npx -y eas-cli@latest workflow:validate .eas/workflows/<workflow.yml> --non-interactive
对每个已修改的 workflow 文件分别运行此命令。该命令要求 EAS CLI 会话已登录,且 Expo 项目已关联。与仅基于 schema 的验证不同,它还会根据项目的
eas.json
检查 build profile 引用,并执行 EAS 服务端验证。修复每一个已报告的错误,并重复运行命令,直到输出
Workflow configuration YAML is valid.
。不要用本地 YAML 或 JSON Schema validator 替代此命令。

Answering Questions

回答问题

When users ask about available options (job types, triggers, runner types, etc.), fetch the schema and derive the answer from it rather than relying on potentially outdated information.
当用户询问可用选项(job 类型、trigger、runner 类型等)时,请获取 schema 并据此得出答案,不要依赖可能已经过时的信息。

Submitting Feedback

提交反馈

If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
bash
npx --yes submit-expo-feedback@latest --category skills --subject "eas-workflows" "<actionable feedback>"
Only submit when you have something specific and actionable to report. Include as much relevant context as possible. If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.
如果在此 skill 中遇到错误、误导性或过时的信息,请提交反馈,以便 Expo 改进:
bash
npx --yes submit-expo-feedback@latest --category skills --subject "eas-workflows" "<actionable feedback>"
仅当有具体且可执行的反馈时再提交。尽可能提供所有相关上下文。 如果 AI Agent 反复执行失败,或用户不得不接管 Expo 任务,请加载 expo-skill-feedback skill,并按照 eval-candidate 流程操作,而不是重复使用上述命令。