gplay workflow
gplay workflow
Section titled “gplay workflow”Run multi-step automation workflows.
gplay workflow <subcommand> [flags]Define reusable Google Play release workflows in .gplay/workflows/*.json. Workflow files can contain one legacy workflow or multiple named workflows.
Example workflow file (.gplay/workflows/release.json):
{ “workflows”: { “preflight”: { “steps”: [ { “name”: “readiness”, “run”: “gplay validate –package {{ .PACKAGE }} –track {{ .TRACK }} –bundle {{ .BUNDLE }}”, “outputs”: { “status”: “$.summary.status” } } ] }, “publish”: { “params”: [ {“name”: “PACKAGE”, “required”: true}, {“name”: “TRACK”, “required”: true}, {“name”: “BUNDLE”, “required”: true} ], “steps”: [ {“name”: “preflight”, “workflow”: “preflight”, “with”: {“PACKAGE”: “{{ .PACKAGE }}”, “TRACK”: “{{ .TRACK }}”, “BUNDLE”: “{{ .BUNDLE }}”}}, {“name”: “release”, “run”: “gplay publish track –package {{ .PACKAGE }} –track {{ .TRACK }} –bundle {{ .BUNDLE }}”} ] } } }
Security note: Workflows execute arbitrary shell commands. Only run workflow files you trust.
Tips: Use gplay workflow validate before running a new workflow file. Preview the plan with gplay workflow run –dry-run release –workflow publish.
Examples: gplay workflow list gplay workflow validate release.json gplay workflow run release –workflow publish –param PACKAGE=com.example.app –param TRACK=internal –param BUNDLE=app.aab gplay workflow run –dry-run ./release.json –workflow publish
gplay workflow run
Section titled “gplay workflow run”Run a named workflow.
gplay workflow run <name-or-file> [--workflow <name>] [--param KEY=VALUE ...] [--dry-run] [--resume]Run a workflow from .gplay/workflows/ or a direct file path.
The workflow file is resolved from .gplay/workflows/<name>.json first unless you pass an explicit path. Legacy single-workflow files still work.
Examples: gplay workflow run release –workflow publish –param PACKAGE=com.example.app –param TRACK=internal –param BUNDLE=app.aab gplay workflow run ./release.json –workflow publish –param TRACK=production gplay workflow run –dry-run release –workflow publish gplay workflow run release –workflow publish –resume
| Flag | Description | Default |
|---|---|---|
--dry-run |
Preview steps without executing | false |
--param |
Workflow parameter in KEY=VALUE format (repeatable) | `` |
--pretty |
Pretty-print JSON output | false |
--resume |
Resume from last saved state | false |
--workflow |
Workflow name when the file contains multiple workflows | `` |
gplay workflow validate
Section titled “gplay workflow validate”Validate a workflow definition for errors.
gplay workflow validate <name-or-file>Validate a workflow file for structure, references, output declarations, and cycles.
Examples: gplay workflow validate release gplay workflow validate ./release.json
| Flag | Description | Default |
|---|---|---|
--pretty |
Pretty-print JSON output | false |
gplay workflow list
Section titled “gplay workflow list”List available workflows.
gplay workflow list [--dir <path>]List workflows found in .gplay/workflows/ (or a custom directory).
Examples: gplay workflow list gplay workflow list –dir ./workflows
| Flag | Description | Default |
|---|---|---|
--dir |
Directory containing workflow files | .gplay/workflows |
--pretty |
Pretty-print JSON output | false |