eas-workflows
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEAS Workflows Skill
EAS工作流技能
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工作流运行于Expo Application Services(一款带有免费额度限制的付费产品)之上。每个工作流任务会消耗您套餐内的构建/计算时长,而涉及构建或提交的任务还需要付费的Apple Developer和Google Play账号。触发任务前,请查看https://expo.dev/pricing了解详情。
帮助开发者编写和编辑EAS CI/CD工作流YAML文件。
Reference Documentation
参考文档
Fetch these resources before generating or validating workflow files. First resolve this skill's directory, then use the fetch script in its directory. It is implemented using Node.js and caches responses using ETags for efficiency:
scripts/bash
undefined在生成或验证工作流文件前,请获取以下资源。首先定位此技能的目录,然后使用其目录下的获取脚本。该脚本基于Node.js实现,并利用ETags缓存响应以提升效率:
scripts/bash
undefinedFetch 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 validation
- 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
- 验证的权威依据
- 包含所有任务类型及其必填/可选参数
- 触发类型及配置
- 运行器类型、VM镜像及所有枚举值
2. **语法文档** — https://raw.githubusercontent.com/expo/expo/refs/heads/main/docs/pages/eas/workflows/syntax.mdx
- 工作流YAML语法概述
- 示例及英文说明
- 表达式语法及上下文
3. **预封装任务** — https://raw.githubusercontent.com/expo/expo/refs/heads/main/docs/pages/eas/workflows/pre-packaged-jobs.mdx
- 受支持的预封装任务类型文档
- 任务专属参数及输出
请勿依赖记忆中的值;这些资源会随着新功能的添加而不断更新。Workflow File Location
工作流文件位置
Workflows live in (or ).
.eas/workflows/*.yml.yaml工作流文件存放于(或)目录下。
.eas/workflows/*.yml.yamlTop-Level Structure
顶层结构
A workflow file has these top-level keys:
- — Display name for the workflow
name - — Triggers that start the workflow (at least one required)
on - — Job definitions (required)
jobs - — Shared defaults for all jobs
defaults - — Control parallel workflow runs
concurrency
Consult the schema for the full specification of each section.
工作流文件包含以下顶层键:
- — 工作流的显示名称
name - — 触发工作流启动的条件(至少需配置一个)
on - — 任务定义(必填)
jobs - — 所有任务共享的默认配置
defaults - — 控制工作流的并行运行
concurrency
每个部分的完整规范请参考Schema。
Expressions
表达式
Use syntax for dynamic values. The schema defines available contexts:
${{ }}- — GitHub repository and event information
github.* - — Values from
inputs.*inputsworkflow_dispatch - — Outputs and status from dependent jobs
needs.* - — Job outputs (alternative syntax)
jobs.* - — Step outputs within custom jobs
steps.* - — Workflow metadata
workflow.*
使用语法表示动态值。Schema定义了可用的上下文:
${{ }}- — GitHub仓库及事件信息
github.* - —
inputs.*输入的值workflow_dispatch - — 依赖任务的输出及状态
needs.* - — 任务输出(替代语法)
jobs.* - — 自定义任务内的步骤输出
steps.* - — 工作流元数据
workflow.*
Generating Workflows
生成工作流
When generating or editing workflows:
- Fetch the schema to get current job types, parameters, and allowed values
- Validate that required fields are present for each job type
- Verify job references in and
needsexist in the workflowafter - Check that expressions reference valid contexts and outputs
- Ensure conditions respect the schema's length constraints
if
生成或编辑工作流时:
- 获取Schema以获取当前的任务类型、参数及允许的值
- 验证每个任务类型的必填字段是否存在
- 确认和
needs中引用的任务在工作流中存在after - 检查表达式是否引用了有效的上下文和输出
- 确保条件符合Schema的长度限制
if
Validation
验证
After generating or editing a workflow file, validate it against the schema:
sh
undefined生成或编辑工作流文件后,请根据Schema进行验证:
sh
undefinedInstall dependencies if missing
若缺少依赖则安装
[ -d "<skill-dir>/scripts/node_modules" ] || npm install --prefix <skill-dir>/scripts
node <skill-dir>/scripts/validate.js <workflow.yml> [workflow2.yml ...]
The validator fetches the latest schema and checks the YAML structure. Fix any reported errors before considering the workflow complete.[ -d "<skill-dir>/scripts/node_modules" ] || npm install --prefix <skill-dir>/scripts
node <skill-dir>/scripts/validate.js <workflow.yml> [workflow2.yml ...]
验证器会获取最新的Schema并检查YAML结构。在确认工作流完成前,请修复所有报告的错误。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.
当用户询问可用选项(如任务类型、触发方式、运行器类型等)时,请获取Schema并从中推导答案,而非依赖可能过时的信息。