asc-workflow by rudrankriyam/app-store-connect-cli-skills
npx skills add https://github.com/rudrankriyam/app-store-connect-cli-skills --skill asc-workflow当您需要在 CLI 内使用车道式自动化时,请使用此技能,涉及以下命令:
asc workflow runasc workflow validateasc workflow list此功能最适合用于存放在您的代码仓库中、可在 PR 中审查、并且可以在本地和 CI 中以相同方式运行的确定性自动化流程。
--help 来确认标志和子命令:
asc workflow --helpasc workflow run --helpasc workflow validate --help广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
asc workflow list --help.asc/workflow.jsonasc workflow validateasc workflow listasc workflow list --all (包含私有辅助工作流)asc workflow run --dry-run betaasc workflow run beta BUILD_ID:123456789 GROUP_ID:abcdef.asc/workflow.jsonasc workflow run --file ./path/to/workflow.json <name>// 和 /* ... */)stdout:结构化的 JSON 结果 (status, steps, 持续时间)stderr:步骤命令输出、钩子输出、试运行预览asc workflow validate 始终打印 JSON,并在无效时返回非零值这使得机器安全检查成为可能:
asc workflow validate | jq -e '.valid == true'
asc workflow run beta BUILD_ID:123 GROUP_ID:xyz | jq -e '.status == "ok"'
顶级键:
env:全局默认值before_all:在步骤之前运行一次的命令after_all:在步骤成功后运行一次的命令error:当任何失败发生时运行的命令workflows:命名的工作流映射工作流键:
descriptionprivate (不可直接运行)envsteps步骤形式:
"echo hello" -> 运行步骤run:shell 命令workflow:调用子工作流name:用于报告的标签if:条件变量名with:仅用于工作流调用步骤的环境变量覆盖KEY:VALUE / KEY=VALUE)asc workflow run <name> [KEY:VALUE ...] 支持两种分隔符:
VERSION:2.1.0VERSION=2.1.0$VAR) 引用参数。.asc/workflow.json 中;通过 CI 密钥/环境变量传递它们。asc workflow run 在工作流名称后也接受核心标志:
--dry-run--pretty--file示例:
asc workflow run beta --dry-runasc workflow run beta --file .asc/workflow.json BUILD_ID:123before_all 在步骤执行前运行一次after_all 仅在步骤成功时运行error 在失败时运行(步骤失败、before/after 钩子失败)主工作流运行:
definition.env < workflow.env < CLI 参数子工作流调用步骤 ("workflow": "...", "with": {...}):
env 默认值with 覆盖所有"workflow": "<name>" 来调用辅助工作流。"private": true 表示仅供辅助使用的工作流。asc workflow list 中隐藏,除非使用 --allif)"if": "VAR_NAME"。VAR_NAME 为真值时,步骤才会运行。1, true, yes, y, on (不区分大小写)。if 查找的解析顺序:
os.Getenv(VAR_NAME)asc workflow run --dry-run <name> 不执行命令。stderr。bash -o pipefail -c。sh -c。将工作流文件保存在版本控制中。
尽可能在步骤命令中使用 ID 以实现确定性自动化。
在步骤内部进行破坏性的 asc 操作时,使用 --confirm。
先验证,然后试运行,最后实际运行。
保持钩子轻量级并注意副作用。
{ "env": { "APP_ID": "123456789", "VERSION": "1.0.0" }, "before_all": "asc auth status", "after_all": "echo workflow_done", "error": "echo workflow_failed", "workflows": { "beta": { "description": "将构建版本分发到 TestFlight 群组并通知", "env": { "GROUP_ID": "" }, "steps": [ { "name": "list_builds", "run": "asc builds list --app $APP_ID --sort -uploadedDate --limit 5" }, { "name": "list_groups", "run": "asc testflight groups list --app $APP_ID --limit 20" }, { "name": "add_build_to_group", "if": "BUILD_ID", "run": "asc builds add-groups --build $BUILD_ID --group $GROUP_ID" }, { "name": "notify", "if": "SLACK_WEBHOOK", "run": "echo sent_release_notice" } ] }, "release": { "description": "提交版本以供 App Store 审核", "steps": [ { "workflow": "sync-metadata", "with": { "METADATA_DIR": "./metadata" } }, { "name": "submit", "run": "asc submit create --app $APP_ID --version $VERSION --build $BUILD_ID --confirm" } ] }, "sync-metadata": { "private": true, "description": "私有辅助工作流(仅可通过工作流步骤调用)", "steps": [ { "name": "migrate_validate", "run": "echo METADATA_DIR_is_$METADATA_DIR" } ] } } }
# 验证并在文件无效时使 CI 失败
asc workflow validate | jq -e '.valid == true'
# 显示可发现的工作流
asc workflow list --pretty
# 包含私有辅助工作流
asc workflow list --all --pretty
# 预览实际运行
asc workflow run --dry-run beta BUILD_ID:123 GROUP_ID:grp_abc
# 使用参数运行并断言成功
asc workflow run beta BUILD_ID:123 GROUP_ID:grp_abc | jq -e '.status == "ok"'
每周安装量
841
代码仓库
GitHub 星标数
588
首次出现
2026年2月18日
安全审计
安装于
codex825
opencode818
gemini-cli816
github-copilot810
amp800
kimi-cli799
Use this skill when you need lane-style automation inside the CLI using:
asc workflow runasc workflow validateasc workflow listThis feature is best for deterministic automation that lives in your repo, is reviewable in PRs, and can run the same way locally and in CI.
--help to confirm flags and subcommands:
asc workflow --helpasc workflow run --helpasc workflow validate --helpasc workflow list --help.asc/workflow.jsonasc workflow validateasc workflow listasc workflow list --all (includes private helpers)asc workflow run --dry-run betaasc workflow run beta BUILD_ID:123456789 GROUP_ID:abcdef.asc/workflow.jsonasc workflow run --file ./path/to/workflow.json <name>// and /* ... */)stdout: structured JSON result (status, steps, durations)stderr: step command output, hook output, dry-run previewsasc workflow validate always prints JSON and returns non-zero when invalidThis enables machine-safe checks:
asc workflow validate | jq -e '.valid == true'
asc workflow run beta BUILD_ID:123 GROUP_ID:xyz | jq -e '.status == "ok"'
Top-level keys:
env: global defaultsbefore_all: command run once before stepsafter_all: command run once after successful stepserror: command run when any failure occursworkflows: named workflow mapWorkflow keys:
descriptionprivate (not directly runnable)envstepsStep forms:
"echo hello" -> run steprun: shell commandworkflow: call sub-workflowname: label for reportingif: conditional var namewith: env overrides for workflow-call steps onlyKEY:VALUE / KEY=VALUE)asc workflow run <name> [KEY:VALUE ...] supports both separators:
VERSION:2.1.0VERSION=2.1.0$VAR)..asc/workflow.json; pass them via CI secrets/env.asc workflow run also accepts core flags after the workflow name:
--dry-run--pretty--fileExamples:
asc workflow run beta --dry-runasc workflow run beta --file .asc/workflow.json BUILD_ID:123before_all runs once before step executionafter_all runs only when steps succeederror runs on failure (step failure, before/after hook failure)Main workflow run:
definition.env < workflow.env < CLI paramsSub-workflow call step ("workflow": "...", "with": {...}):
env defaultswith overrides all"workflow": "<name>" to call helper workflows."private": true for helper-only workflows.asc workflow list unless --all is usedif)"if": "VAR_NAME" on a step.VAR_NAME is truthy.1, true, yes, y, on (case-insensitive).if lookup:
os.Getenv(VAR_NAME)asc workflow run --dry-run <name> does not execute commands.stderr.bash -o pipefail -c when bash is available.sh -c when bash is unavailable.Keep workflow files in version control.
Use IDs in step commands where possible for deterministic automation.
Use --confirm for destructive asc operations inside steps.
Validate first, then dry-run, then real run.
Keep hooks lightweight and side-effect aware.
{ "env": { "APP_ID": "123456789", "VERSION": "1.0.0" }, "before_all": "asc auth status", "after_all": "echo workflow_done", "error": "echo workflow_failed", "workflows": { "beta": { "description": "Distribute a build to a TestFlight group and notify", "env": { "GROUP_ID": "" }, "steps": [ { "name": "list_builds", "run": "asc builds list --app $APP_ID --sort -uploadedDate --limit 5" }, { "name": "list_groups", "run": "asc testflight groups list --app $APP_ID --limit 20" }, { "name": "add_build_to_group", "if": "BUILD_ID", "run": "asc builds add-groups --build $BUILD_ID --group $GROUP_ID" }, { "name": "notify", "if": "SLACK_WEBHOOK", "run": "echo sent_release_notice" } ] }, "release": { "description": "Submit a version for App Store review", "steps": [ { "workflow": "sync-metadata", "with": { "METADATA_DIR": "./metadata" } }, { "name": "submit", "run": "asc submit create --app $APP_ID --version $VERSION --build $BUILD_ID --confirm" } ] }, "sync-metadata": { "private": true, "description": "Private helper workflow (callable only via workflow steps)", "steps": [ { "name": "migrate_validate", "run": "echo METADATA_DIR_is_$METADATA_DIR" } ] } } }
# Validate and fail CI on invalid file
asc workflow validate | jq -e '.valid == true'
# Show discoverable workflows
asc workflow list --pretty
# Include private helpers
asc workflow list --all --pretty
# Preview a real run
asc workflow run --dry-run beta BUILD_ID:123 GROUP_ID:grp_abc
# Run with params and assert success
asc workflow run beta BUILD_ID:123 GROUP_ID:grp_abc | jq -e '.status == "ok"'
Weekly Installs
841
Repository
GitHub Stars
588
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex825
opencode818
gemini-cli816
github-copilot810
amp800
kimi-cli799
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装