App-store-connect-cli-skills asc-workflow
Define, validate, and run repo-local multi-step automations with `asc workflow` and `.asc/workflow.json`. Use when migrating from lane tools, wiring CI pipelines, or orchestrating repeatable `asc` + shell release flows with hooks, conditionals, and sub-workflows.
install
source · Clone the upstream repo
git clone https://github.com/rorkai/app-store-connect-cli-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/rorkai/app-store-connect-cli-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/asc-workflow" ~/.claude/skills/rudrankriyam-app-store-connect-cli-skills-asc-workflow && rm -rf "$T"
manifest:
skills/asc-workflow/SKILL.mdsource content
asc workflow
Use this skill when you need lane-style automation inside the CLI using:
asc workflow runasc workflow validateasc workflow list
This 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.
Command discovery
- Always use
to confirm flags and subcommands:--helpasc workflow --helpasc workflow run --helpasc workflow validate --helpasc workflow list --help
End-to-end flow
- Author
.asc/workflow.json - Validate structure and references:
asc workflow validate
- Discover available workflows:
asc workflow list
(includes private helpers)asc workflow list --all
- Preview execution without side effects:
asc workflow run --dry-run beta
- Execute with runtime params:
asc workflow run beta BUILD_ID:123456789 GROUP_ID:abcdef
File location and format
- Default path:
.asc/workflow.json - Override path:
asc workflow run --file ./path/to/workflow.json <name> - JSONC comments are supported (
and//
)/* ... */
Output and CI contract
: structured JSON result (stdout
,status
, durations)steps
: step command output, hook output, dry-run previewsstderr
always prints JSON and returns non-zero when invalidasc workflow validate
This 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"'
Schema (what the feature supports)
Top-level keys:
: global defaultsenv
: command run once before stepsbefore_all
: command run once after successful stepsafter_all
: command run when any failure occurserror
: named workflow mapworkflows
Workflow keys:
description
(not directly runnable)privateenvsteps
Step forms:
- String shorthand:
-> run step"echo hello" - Object with:
: shell commandrun
: call sub-workflowworkflow
: label for reportingname
: conditional var nameif
: env overrides for workflow-call steps onlywith
Runtime params (KEY:VALUE
/ KEY=VALUE
)
KEY:VALUEKEY=VALUE
supports both separators:asc workflow run <name> [KEY:VALUE ...]VERSION:2.1.0VERSION=2.1.0
- If both separators exist, the first one wins.
- Repeated keys are last-write-wins.
- In step commands, reference params via shell expansion (
).$VAR - Avoid putting secrets in
; pass them via CI secrets/env..asc/workflow.json
Run-tail flags
asc workflow run also accepts core flags after the workflow name:
--dry-run--pretty--file
Examples:
asc workflow run beta --dry-runasc workflow run beta --file .asc/workflow.json BUILD_ID:123
Execution semantics
runs once before step executionbefore_all
runs only when steps succeedafter_all
runs on failure (step failure, before/after hook failure)error- Sub-workflows are executed inline as part of the call step
- Maximum sub-workflow nesting depth is 16
Env precedence
Main workflow run:
<definition.env
< CLI paramsworkflow.env
Sub-workflow call step (
"workflow": "...", "with": {...}):
- sub-workflow
defaultsenv - caller env (including CLI params) overrides
- step
overrides allwith
Sub-workflows and private workflows
- Use
to call helper workflows."workflow": "<name>" - Use
for helper-only workflows."private": true - Private workflows:
- cannot be run directly
- can be called by other workflows
- are hidden from
unlessasc workflow list
is used--all
- Validation catches unknown workflow references and cyclic references.
Conditionals (if
)
if- Add
on a step."if": "VAR_NAME" - Step runs only if
is truthy.VAR_NAME - Truthy:
,1
,true
,yes
,y
(case-insensitive).on - Resolution order for
lookup:if- merged workflow env/params
os.Getenv(VAR_NAME)
Dry-run behavior
does not execute commands.asc workflow run --dry-run <name>- It prints previews to
.stderr - Dry-run shows raw commands (without env expansion), which helps avoid secret leakage in previews.
Shell behavior
- Run steps use
when bash is available.bash -o pipefail -c - Fallback is
when bash is unavailable.sh -c - Pipelines therefore fail correctly in most CI shells when bash exists.
Practical authoring rules
- Keep workflow files in version control.
- Use IDs in step commands where possible for deterministic automation.
- Use
for destructive--confirm
operations inside steps.asc - 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-id $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" } ] } } }
Useful invocations
# 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"'