trigger_build
Trigger a new build on Codemagic by providing the app ID and workflow ID, with optional environment variables and inline YAML.
Instructions
Trigger a new build on Codemagic. For release builds: determine BUILD_NUMBER first using list_asc_builds (iOS) or list_google_play_tracks (Android), then pass it in the variables parameter. Use yaml_content to supply an inline codemagic.yaml — get a starter template from get_yaml_template and validate it with validate_codemagic_yaml before triggering. Call wait_for_build with the returned build ID to wait for completion and retrieve artifact URLs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | The application ID | |
| workflow_id | Yes | The workflow ID to run | |
| branch | No | Git branch to build | |
| tag | No | Git tag to build | |
| variables | No | Environment variables to inject into the build | |
| groups | No | Environment variable groups to include | |
| labels | No | Labels to attach to the build | |
| yaml_content | No | A codemagic.yaml file content to use for this build. When provided, the yaml is passed inline and does not need to exist in the repository. | |
| instance_type | No | Override the instance type for this build. Common values: mac_mini_m2, mac_mini_m4, linux_x2, linux_x4, windows_x2. Must be available on your billing plan. If omitted, the instance type from codemagic.yaml is used. IMPORTANT: Personal accounts (no team) can only use mac_mini_m2 — linux_x2, linux_x4, and mac_mini_m4 are not available on personal accounts. |