App Store Workflow Runner
Use asc workflow for lane-style repo-local automation. Workflows run trusted shell commands, stream step output to stderr, and keep stdout machine-readable JSON.
Commands
Verify flags first:
asc workflow --help
asc workflow validate --help
asc workflow list --help
asc workflow run --help
Run flow:
asc workflow validate
asc workflow list
asc workflow list --all
asc workflow run --dry-run beta BUILD_ID:123 GROUP_ID:abc
asc workflow run beta BUILD_ID:123 GROUP_ID:abc
asc workflow run release --resume "release-20260312T120000Z-deadbeef"
Do not pass new KEY:VALUE params with --resume; saved workflow, params, and outputs are reused.
File Contract
- Default:
.asc/workflow.json; override with --file.
- JSONC comments supported.
- Top-level hooks:
before_all, after_all, error.
- Workflow keys:
description, private, env, steps.
- Step forms: string shorthand,
run, workflow, name, if, with, outputs.
- Runtime params accept
KEY:VALUE and KEY=VALUE; repeated keys are last-write-wins.
- Env precedence:
definition.env < workflow.env < CLI params; for sub-workflows: sub env < caller env/params < step with.
- Conditional truthy values:
1, true, yes, y, on.
Outputs:
run steps that declare outputs must emit JSON stdout, have unique reference-safe name, and should call asc ... --output json.
- Reference as
${steps.step_name.OUTPUT_NAME}.
- Do not map secrets into persisted outputs.
Minimal Example
{
"env": { "APP_ID": "123", "VERSION": "1.0.0", "GROUP_ID": "" },
"before_all": "asc auth status",
"workflows": {
"beta": {
"description": "Resolve latest build and distribute to TestFlight",
"steps": [
{
"name": "resolve_build",
"run": "asc builds info --app $APP_ID --latest --platform IOS --output json",
"outputs": { "BUILD_ID": "$.data.id" }
},
{ "name": "groups", "run": "asc testflight groups list --app $APP_ID --limit 20 --output json" },
{ "name": "add", "if": "GROUP_ID", "run": "asc builds add-groups --build-id ${steps.resolve_build.BUILD_ID} --group $GROUP_ID" }
]
},
"release": {
"steps": [
{ "name": "validate", "run": "asc validate --app $APP_ID --version $VERSION --platform IOS --output json" },
{ "name": "stage", "run": "asc release stage --app $APP_ID --version $VERSION --build $BUILD_ID --metadata-dir ./metadata/version/$VERSION --confirm --output json" },
{ "name": "submit", "if": "SUBMIT_FOR_REVIEW", "run": "asc review submit --app $APP_ID --version $VERSION --build $BUILD_ID --confirm --output json" }
]
}
}
}
Agent Rules
- Keep workflows repo-local and reviewed; do not put secrets in workflow JSON or outputs.
- Prefer dry-run before mutating release/TestFlight flows.
- Use
private: true for helper workflows not meant for direct listing.
- After failures, preserve run ID and resume only when the command indicates recovery is safe.
1---2name: appstore-workflow-runner3description: Manage `.asc/workflow.json` automations; define, validate, run, resume, and audit trusted repo-local release/TestFlight flows and step outputs with `asc workflow`.4---56# App Store Workflow Runner78Use `asc workflow` for lane-style repo-local automation. Workflows run trusted shell commands, stream step output to stderr, and keep stdout machine-readable JSON.910## Commands1112Verify flags first:1314```bash15asc workflow --help16asc workflow validate --help17asc workflow list --help18asc workflow run --help19```2021Run flow:2223```bash24asc workflow validate25asc workflow list26asc workflow list --all27asc workflow run --dry-run beta BUILD_ID:123 GROUP_ID:abc28asc workflow run beta BUILD_ID:123 GROUP_ID:abc29asc workflow run release --resume "release-20260312T120000Z-deadbeef"30```3132Do not pass new `KEY:VALUE` params with `--resume`; saved workflow, params, and outputs are reused.3334## File Contract3536- Default: `.asc/workflow.json`; override with `--file`.37- JSONC comments supported.38- Top-level hooks: `before_all`, `after_all`, `error`.39- Workflow keys: `description`, `private`, `env`, `steps`.40- Step forms: string shorthand, `run`, `workflow`, `name`, `if`, `with`, `outputs`.41- Runtime params accept `KEY:VALUE` and `KEY=VALUE`; repeated keys are last-write-wins.42- Env precedence: `definition.env < workflow.env < CLI params`; for sub-workflows: `sub env < caller env/params < step with`.43- Conditional truthy values: `1`, `true`, `yes`, `y`, `on`.4445Outputs:4647- `run` steps that declare `outputs` must emit JSON stdout, have unique reference-safe `name`, and should call `asc ... --output json`.48- Reference as `${steps.step_name.OUTPUT_NAME}`.49- Do not map secrets into persisted outputs.5051## Minimal Example5253```json54{55 "env": { "APP_ID": "123", "VERSION": "1.0.0", "GROUP_ID": "" },56 "before_all": "asc auth status",57 "workflows": {58 "beta": {59 "description": "Resolve latest build and distribute to TestFlight",60 "steps": [61 {62 "name": "resolve_build",63 "run": "asc builds info --app $APP_ID --latest --platform IOS --output json",64 "outputs": { "BUILD_ID": "$.data.id" }65 },66 { "name": "groups", "run": "asc testflight groups list --app $APP_ID --limit 20 --output json" },67 { "name": "add", "if": "GROUP_ID", "run": "asc builds add-groups --build-id ${steps.resolve_build.BUILD_ID} --group $GROUP_ID" }68 ]69 },70 "release": {71 "steps": [72 { "name": "validate", "run": "asc validate --app $APP_ID --version $VERSION --platform IOS --output json" },73 { "name": "stage", "run": "asc release stage --app $APP_ID --version $VERSION --build $BUILD_ID --metadata-dir ./metadata/version/$VERSION --confirm --output json" },74 { "name": "submit", "if": "SUBMIT_FOR_REVIEW", "run": "asc review submit --app $APP_ID --version $VERSION --build $BUILD_ID --confirm --output json" }75 ]76 }77 }78}79```8081## Agent Rules8283- Keep workflows repo-local and reviewed; do not put secrets in workflow JSON or outputs.84- Prefer dry-run before mutating release/TestFlight flows.85- Use `private: true` for helper workflows not meant for direct listing.86- After failures, preserve run ID and resume only when the command indicates recovery is safe.