{
    "title": "Codemagic CI/CD configuration file - docs.codemagic.io",
    "type": "object",
    "properties": {
        "workflows": {
            "title": "Workflows for building a project",
            "description": "You can use codemagic.yaml to define several workflows for building a project. Each workflow describes the entire build pipeline from triggers to publishing. For example, you may want to have separate workflows for developing, testing and publishing the app.",
            "errorMessage": "Incorrect type. Expected a dictionary",
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/Workflow"
            }
        }
    },
    "required": [
        "workflows"
    ],
    "definitions": {
        "InstanceType": {
            "title": "InstanceType",
            "description": "Build machine type to use for the build.",
            "enum": [
                "mac_mini",
                "mac_mini_m1",
                "mac_mini_m2",
                "mac_pro",
                "linux",
                "linux_x2",
                "windows_x2"
            ],
            "type": "string"
        },
        "DistributionType": {
            "title": "DistributionType",
            "description": "An enumeration.",
            "enum": [
                "ad_hoc",
                "app_store",
                "development",
                "enterprise"
            ],
            "type": "string"
        },
        "ProfileWithVariable": {
            "title": "ProfileWithVariable",
            "type": "object",
            "properties": {
                "profile": {
                    "title": "Profile reference",
                    "description": "Profile reference found in Team settings -> Code signing identities",
                    "minLength": 1,
                    "type": "string"
                },
                "environment_variable": {
                    "title": "Environment variable",
                    "description": "Name of the variable containing the profile path",
                    "minLength": 1,
                    "type": "string"
                }
            },
            "required": [
                "profile"
            ],
            "additionalProperties": false
        },
        "CertificateWithVariable": {
            "title": "CertificateWithVariable",
            "type": "object",
            "properties": {
                "certificate": {
                    "title": "Certificate reference",
                    "description": "Certificate reference found in Team settings -> Code signing identities",
                    "minLength": 1,
                    "type": "string"
                },
                "environment_variable": {
                    "title": "Environment variable",
                    "description": "Name of the variable containing the certificate path",
                    "minLength": 1,
                    "type": "string"
                }
            },
            "required": [
                "certificate"
            ],
            "additionalProperties": false
        },
        "IosSigning": {
            "title": "IosSigning",
            "type": "object",
            "properties": {
                "distribution_type": {
                    "title": "Distribution type",
                    "description": "Type of certificates and profiles to fetch from Code signing identities",
                    "errorMessage": "Incorrect distribution type. Expected one of ad_hoc, app_store, development, enterprise",
                    "allOf": [
                        {
                            "$ref": "#/definitions/DistributionType"
                        }
                    ]
                },
                "bundle_identifier": {
                    "title": "Bundle identifier",
                    "description": "Bundle identifier of certificates and profiles to fetch from Code signing identities",
                    "minLength": 1,
                    "type": "string"
                },
                "provisioning_profiles": {
                    "title": "Provisioning profiles",
                    "description": "Provisioning profiles to fetch from Code signing identities",
                    "errorMessage": "Incorrect type. Expected list of strings or dictionaries",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1
                            },
                            {
                                "$ref": "#/definitions/ProfileWithVariable"
                            }
                        ]
                    }
                },
                "certificates": {
                    "title": "Certificates",
                    "description": "Certificates to fetch from Code signing identities",
                    "errorMessage": "Incorrect type. Expected list of strings or dictionaries",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1
                            },
                            {
                                "$ref": "#/definitions/CertificateWithVariable"
                            }
                        ]
                    }
                }
            },
            "additionalProperties": false
        },
        "KeystoreWithVariables": {
            "title": "KeystoreWithVariables",
            "type": "object",
            "properties": {
                "keystore": {
                    "title": "Keystore reference",
                    "description": "Keystore reference found in Team settings -> Code signing identities",
                    "minLength": 1,
                    "type": "string"
                },
                "keystore_environment_variable": {
                    "title": "Keystore environment variable",
                    "description": "Name of the variable containing the keystore path",
                    "minLength": 1,
                    "type": "string"
                },
                "keystore_password_environment_variable": {
                    "title": "Keystore password environment variable",
                    "description": "Name of the variable containing the keystore password",
                    "minLength": 1,
                    "type": "string"
                },
                "key_alias_environment_variable": {
                    "title": "Key alias environment variable",
                    "description": "Name of the variable containing the key alias",
                    "minLength": 1,
                    "type": "string"
                },
                "key_password_environment_variable": {
                    "title": "Key password environment variable",
                    "description": "Name of the variable containing the key password",
                    "minLength": 1,
                    "type": "string"
                }
            },
            "required": [
                "keystore"
            ],
            "additionalProperties": false
        },
        "FlutterWithFlavor": {
            "title": "FlutterWithFlavor",
            "type": "object",
            "properties": {
                "version": {
                    "title": "Flutter version",
                    "description": "Define the channel name, version (e.g. v1.13.4) or 'fvm' if using Flutter Version Management.",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "flavor": {
                    "title": "Flutter flavor",
                    "description": "The name of the flavor to use when using FVM.",
                    "minLength": 1,
                    "type": "string"
                }
            },
            "required": [
                "version"
            ],
            "additionalProperties": false
        },
        "Environment": {
            "title": "Environment",
            "type": "object",
            "properties": {
                "vars": {
                    "title": "Environment variables",
                    "description": "Define your environment variables.",
                    "errorMessage": "Incorrect type. Expected a dictionary with integer, float, boolean or nonempty string as values",
                    "type": "object",
                    "patternProperties": {
                        "[0-9a-zA-Z_]+": {
                            "anyOf": [
                                {
                                    "type": "string",
                                    "minLength": 1
                                },
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "boolean"
                                }
                            ]
                        }
                    },
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1
                            },
                            {
                                "type": "integer"
                            },
                            {
                                "type": "number"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    }
                },
                "groups": {
                    "title": "Environment variable groups",
                    "description": "Define environment variable group names that have been configured in app or team settings.",
                    "errorMessage": "Incorrect type. Expected a list of nonempty strings",
                    "type": "array",
                    "items": {
                        "type": "string",
                        "minLength": 1
                    }
                },
                "ios_signing": {
                    "title": "iOS code signing identities",
                    "description": "iOS code signing identities configured under Team settings",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/IosSigning"
                        }
                    ]
                },
                "android_signing": {
                    "title": "Android code signing identities",
                    "description": "Android code signing identities configured under Team settings",
                    "errorMessage": "Incorrect type. Expected a list",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/definitions/KeystoreWithVariables"
                            },
                            {
                                "type": "string",
                                "minLength": 1
                            }
                        ]
                    }
                },
                "xcode": {
                    "title": "Xcode version",
                    "description": "Define latest, edge or version (e.g. 11.2).",
                    "default": "latest",
                    "errorMessage": "Incorrect type. Expected an integer, float or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "cocoapods": {
                    "title": "CocoaPods version",
                    "description": "Define default or version (e.g. 1.9.1).",
                    "default": "default",
                    "errorMessage": "Incorrect type. Expected an integer, float or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "node": {
                    "title": "Node version",
                    "description": "Define default, latest, current, lts, carbon (or another stream), nightly or version (e.g. 12.4.0).",
                    "errorMessage": "Incorrect type. Expected an integer, float or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "npm": {
                    "title": "Npm version",
                    "description": "Define default, latest, next, lts or version (e.g. 6.13.7).",
                    "errorMessage": "Incorrect type. Expected an integer, float or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "ndk": {
                    "title": "Ndk revision",
                    "description": "Define default or revision (e.g. r19c).",
                    "errorMessage": "Incorrect type. Expected an integer, float or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "java": {
                    "title": "Java platform version",
                    "description": "Define default, or platform version (e.g. 11).",
                    "errorMessage": "Incorrect type. Expected an integer, float or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "ruby": {
                    "title": "Ruby platform version",
                    "description": "Define default, or platform version (e.g. 2.5.1).",
                    "errorMessage": "Incorrect type. Expected an integer, float or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "flutter": {
                    "title": "Flutter version",
                    "description": "Define the channel name, version (e.g. v1.13.4) or 'fvm' if using Flutter Version Management.",
                    "errorMessage": "Incorrect type. Expected an integer, float, nonempty string or dictionary",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        },
                        {
                            "$ref": "#/definitions/FlutterWithFlavor"
                        }
                    ]
                },
                "unity": {
                    "title": "Unity version",
                    "description": "Define exact version (e.g. 2020.3.15f2).",
                    "errorMessage": "Incorrect type. Expected a nonempty string",
                    "minLength": 1,
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "Integrations": {
            "title": "Integrations",
            "type": "object",
            "properties": {
                "app_store_connect": {
                    "title": "Use info from Apple Developer Portal integration",
                    "description": "Specify the name of the App Store Connect API key to be used from team or personal integrations to authenticate actions for code signing and publishing.",
                    "minLength": 1,
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "Cache": {
            "title": "Cache",
            "type": "object",
            "properties": {
                "cache_paths": {
                    "title": "Paths to be cached",
                    "description": "For example, you may consider caching the following paths: \"$FLUTTER_ROOT/.pub-cache\" for Dart cache, \"$HOME/.gradle/caches\" for gradle cache, \"$HOME/Library/Caches/CocoaPods\" for CocoaPods cache.",
                    "errorMessage": "Incorrect type. Expected a list of nonempty strings",
                    "type": "array",
                    "items": {
                        "type": "string",
                        "minLength": 1
                    }
                }
            },
            "additionalProperties": false
        },
        "TriggeringEvent": {
            "title": "TriggeringEvent",
            "description": "Currently supported events are push, pull_request.",
            "enum": [
                "push",
                "pull_request",
                "tag"
            ],
            "type": "string"
        },
        "BranchPattern": {
            "title": "BranchPattern",
            "type": "object",
            "properties": {
                "pattern": {
                    "title": "Exact value or glob pattern to search for a branch",
                    "description": "The pattern can also be passed with an environment variable.",
                    "default": "*",
                    "errorMessage": "Incorrect type. Expected an integer, float, boolean or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        },
                        {
                            "type": "boolean"
                        }
                    ]
                },
                "include": {
                    "title": "Include the pattern",
                    "description": "If set to false, the matching branches will not be watched for triggering events.",
                    "default": true,
                    "type": "boolean"
                },
                "source": {
                    "title": "Specify whether the watched branch is the source or the target of the pull request",
                    "description": "The variable is ignored for events other than pull_request.",
                    "default": true,
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        },
        "TagPattern": {
            "title": "TagPattern",
            "type": "object",
            "properties": {
                "pattern": {
                    "title": "Exact value or glob pattern to search for a tag",
                    "description": "The pattern can also be passed with an environment variable.",
                    "default": "*",
                    "errorMessage": "Incorrect type. Expected an integer, float, boolean or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        },
                        {
                            "type": "boolean"
                        }
                    ]
                },
                "include": {
                    "title": "Include the pattern",
                    "description": "If set to false, the matching tags will not be watched for triggering events.",
                    "default": true,
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        },
        "Triggering": {
            "title": "Triggering",
            "type": "object",
            "properties": {
                "events": {
                    "title": "List the events that trigger builds",
                    "description": "Currently supported events are push, pull_request, tag.",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TriggeringEvent"
                    }
                },
                "branch_patterns": {
                    "title": "Branch patterns",
                    "description": "A branch pattern can match the name of a particular branch, or you can use wildcard symbols to create a pattern that matches several branches. Note that for pull request builds you have to specify whether the watched branch is the source or the target of the pull request.",
                    "errorMessage": "Incorrect type. Expected a not empty list of dictionaries",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/BranchPattern"
                    }
                },
                "tag_patterns": {
                    "title": "Tag patterns",
                    "description": "A tag pattern can match the name of a particular tag, or you can use wildcard symbols to create a pattern that matches several tags.",
                    "errorMessage": "Incorrect type. Expected a not empty list of dictionaries",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TagPattern"
                    }
                },
                "cancel_previous_builds": {
                    "title": "Cancel previous builds",
                    "description": "To avoid running builds on outdated commits, set cancel_previous_builds to true to automatically cancel all ongoing and queued builds triggered by webhooks on push or pull request commit when a more recent build has been triggered for the same branch.",
                    "default": false,
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        },
        "Changeset": {
            "title": "Changeset",
            "type": "object",
            "properties": {
                "includes": {
                    "title": "Include paths to watch",
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1
                            },
                            {
                                "type": "integer"
                            },
                            {
                                "type": "number"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    }
                },
                "excludes": {
                    "title": "Exclude paths from watched",
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1
                            },
                            {
                                "type": "integer"
                            },
                            {
                                "type": "number"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    }
                }
            },
            "additionalProperties": false
        },
        "When": {
            "title": "When",
            "type": "object",
            "properties": {
                "changeset": {
                    "title": "Watched paths or path patterns",
                    "description": "List of paths or path patterns to watch for changes, proceed if changes are detected.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Changeset"
                        }
                    ]
                },
                "condition": {
                    "title": "Condition",
                    "description": "Check if condition evaluates to true before proceeding with building workflow or script.",
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "ScriptOnFailure": {
            "title": "ScriptOnFailure",
            "description": "The only supported action is to proceed directly to publishing.",
            "enum": [
                "publish"
            ],
            "type": "string"
        },
        "NamedScript": {
            "title": "NamedScript",
            "type": "object",
            "properties": {
                "script": {
                    "title": "Script to be executed",
                    "description": "By default the script will be run in the Bash shell. You can run the script in other languages by defining a shebang line in the beginning.",
                    "minLength": 1,
                    "type": "string"
                },
                "name": {
                    "title": "Script name",
                    "description": "A descriptive script name can be provided to be shown in the UI. If not passed, the first line of your script will be shown in the UI for the script block.",
                    "errorMessage": "Incorrect type. Expected an integer, float, boolean or nonempty string",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1
                        },
                        {
                            "type": "integer"
                        },
                        {
                            "type": "number"
                        },
                        {
                            "type": "boolean"
                        }
                    ]
                },
                "test_report": {
                    "title": "Exact name or glob pattern matching the test result file location",
                    "description": "You can display test results visually in the build overview. The value can be an absolute path, or a path relative to $CM_BUILD_DIR (in this case the patterns will be searched recursively). Supported test report formats are Junit XML and .JSON for Flutter's --machine report.",
                    "minLength": 1,
                    "type": "string"
                },
                "ignore_failure": {
                    "title": "Ignore script failure",
                    "description": "If set to true, the workflow will continue to run even if the script fails.",
                    "default": false,
                    "type": "boolean"
                },
                "on_failure": {
                    "title": "The action to take on script failure",
                    "description": "The only supported action is to proceed directly to publishing.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/ScriptOnFailure"
                        }
                    ]
                },
                "when": {
                    "title": "Conditions for script to continue",
                    "description": "All conditions below should be met in order for script to continue.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/When"
                        }
                    ]
                },
                "working_directory": {
                    "title": "Script working directory",
                    "description": "Specify directory where this script will be executed. It overrides global workflow working directory.",
                    "type": "string"
                }
            },
            "required": [
                "script"
            ],
            "additionalProperties": false
        },
        "PublisherNotification": {
            "title": "PublisherNotification",
            "type": "object",
            "properties": {
                "success": {
                    "title": "Publish on success",
                    "description": "Set to false to not receive a notification when a build succeeds.",
                    "default": true,
                    "type": "boolean"
                },
                "failure": {
                    "title": "Publish on failure",
                    "description": "Set to false to not receive a notification when a build fails.",
                    "default": true,
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        },
        "Email": {
            "title": "Email",
            "type": "object",
            "properties": {
                "recipients": {
                    "title": "List the email addresses to notify about build results",
                    "description": "Provide valid email addresses here.",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "string",
                                "format": "email"
                            },
                            {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "^\\$\\{?([^:}]+).*\\}?$"
                            }
                        ]
                    }
                },
                "notify": {
                    "title": "Email notification settings",
                    "description": "Allows to turn on or turn off email notification on build success or failure.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/PublisherNotification"
                        }
                    ]
                }
            },
            "required": [
                "recipients"
            ],
            "additionalProperties": false
        },
        "Slack": {
            "title": "Slack",
            "type": "object",
            "properties": {
                "channel": {
                    "title": "Specify the Slack channel for publishing",
                    "description": "To allow publishing to private channels, invite the Codemagic Slack app to the channels by writing @codemagic in the channel.",
                    "minLength": 1,
                    "type": "string"
                },
                "notify_on_build_start": {
                    "title": "Send a Slack notification when a build starts",
                    "description": "When you set notify_on_build_start to true, the channel will be notified when a build starts.",
                    "default": false,
                    "type": "boolean"
                },
                "notify": {
                    "title": "Slack notification settings",
                    "description": "Allows to turn on or turn off slack notification on build success or failure.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/PublisherNotification"
                        }
                    ]
                }
            },
            "required": [
                "channel"
            ],
            "additionalProperties": false
        },
        "AppStoreConnectAuth": {
            "title": "AppStoreConnectAuth",
            "description": "An enumeration.",
            "enum": [
                "integration"
            ],
            "type": "string"
        },
        "AppStoreReleaseType": {
            "title": "AppStoreReleaseType",
            "description": "An enumeration.",
            "enum": [
                "MANUAL",
                "AFTER_APPROVAL",
                "SCHEDULED"
            ],
            "type": "string"
        },
        "AppStoreConnect": {
            "title": "AppStoreConnect",
            "type": "object",
            "properties": {
                "auth": {
                    "title": "App Store Connect authentication method",
                    "description": "Accepted value: integration. When defined, the API key info inherited from integrations is used for authenticating with App Store Connect. If you omit this key-value pair, you must define API key, key identifier and issuer identifier explicitly.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/AppStoreConnectAuth"
                        }
                    ]
                },
                "api_key": {
                    "title": "App Store Connect API key",
                    "description": "App Store Connect API key in .p8 format that is used for authenticating application packages validation and upload to App Store Connect. It is required for TestFlight submission.",
                    "errorMessage": "Incorrect type. Expected a string in the form of an encrypted value, environment variable or plain text",
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "string",
                            "pattern": "^Encrypted\\(.+\\)$"
                        },
                        {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "^\\$\\{?([^:}]+).*\\}?$"
                        }
                    ]
                },
                "key_id": {
                    "title": "App Store Connect API key identifier",
                    "description": "App Store Connect API key identifier that is used for authenticating application packages validation and upload to App Store Connect. It is required for TestFlight submission.",
                    "errorMessage": "Incorrect type. Expected a string in the form of an encrypted value, environment variable or plain text",
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "string",
                            "pattern": "^Encrypted\\(.+\\)$"
                        },
                        {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "^\\$\\{?([^:}]+).*\\}?$"
                        }
                    ]
                },
                "issuer_id": {
                    "title": "App Store Connect API key issuer identifier",
                    "description": "App Store Connect API key issuer identifier that is used for authenticating application packages validation and upload to App Store Connect. It is required for TestFlight submission.",
                    "errorMessage": "Incorrect type. Expected a string in the form of an encrypted value, environment variable or plain text",
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "string",
                            "pattern": "^Encrypted\\(.+\\)$"
                        },
                        {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "^\\$\\{?([^:}]+).*\\}?$"
                        }
                    ]
                },
                "apple_id": {
                    "title": "Apple ID",
                    "description": "The email address used to log in to App Store Connect. It can also be passed with an environment variable.",
                    "errorMessage": "Incorrect type. Expected a string in the form of an encrypted value, environment variable or plain text email",
                    "anyOf": [
                        {
                            "type": "string",
                            "format": "email"
                        },
                        {
                            "type": "string",
                            "pattern": "^Encrypted\\(.+\\)$"
                        },
                        {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "^\\$\\{?([^:}]+).*\\}?$"
                        }
                    ]
                },
                "password": {
                    "title": "App-specific password",
                    "description": "App-specific passwords allow you to sign in to your account securely when you use third-party apps with your Apple ID. e.g. ujlw-ypqu-dgzw-vyog. The plain or encrypted password can also be passed with en environment variable.",
                    "errorMessage": "Incorrect type. Expected a string in the form of an encrypted value, environment variable or plain text password",
                    "anyOf": [
                        {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "^([a-z]{4}-){3}[a-z]{4}$"
                        },
                        {
                            "type": "string",
                            "pattern": "^Encrypted\\(.+\\)$"
                        },
                        {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "^\\$\\{?([^:}]+).*\\}?$"
                        }
                    ]
                },
                "submit_to_testflight": {
                    "title": "Submit uploaded application package to Testflight",
                    "description": "Submit published build to Testflight. Requires authentication using App Store Connect API key.",
                    "default": false,
                    "type": "boolean"
                },
                "expire_build_submitted_for_review": {
                    "title": "Expire previous build submitted to review before submitting package to Testflight",
                    "description": "Expire previously submitted build that is in review before submitting published build to Testflight. Requires authentication using App Store Connect API key.",
                    "default": false,
                    "type": "boolean"
                },
                "beta_groups": {
                    "title": "Release uploaded application package to the groups of beta testers",
                    "description": "Published build will be made available to the specified Beta groups in App Store Connect. TestFlight submission is required in order to release builds to the groups of beta testers.",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "submit_to_app_store": {
                    "title": "Submit uploaded application package to App Store review",
                    "description": "Submit published build to App Store review. Requires authentication using App Store Connect API key.",
                    "default": false,
                    "type": "boolean"
                },
                "cancel_previous_submissions": {
                    "title": "Cancel previous submissions before submitting application package to App Store review",
                    "description": "Cancel previous submissions before submitting application package to App Store review. Requires authentication using App Store Connect API key.",
                    "default": false,
                    "type": "boolean"
                },
                "release_type": {
                    "title": "Specify when to release the app after App Store review",
                    "description": "Choose when to release the app. You can either manually release the app at a later date on the App Store Connect website, or the app version can be automatically released right after it has been approved by App Review.",
                    "errorMessage": "Incorrect release type. Expected one of MANUAL, AFTER_APPROVAL, SCHEDULED",
                    "allOf": [
                        {
                            "$ref": "#/definitions/AppStoreReleaseType"
                        }
                    ]
                },
                "earliest_release_date": {
                    "title": "Specify earliest return date for scheduled release type",
                    "description": "Specify earliest return date for scheduled release type. Timezone aware ISO8601 timestamp, for example 2021-11-10T14:55:41+00:00.",
                    "errorMessage": "Not a valid timezone aware ISO8601 timestamp",
                    "type": "string",
                    "format": "date-time"
                },
                "copyright": {
                    "title": "The name of the person or entity that owns the exclusive rights to your app",
                    "description": "The name of the person or entity that owns the exclusive rights to your app, preceded by the year the rights were obtained (for example, \"2008 Acme Inc.\"). Do not provide a URL.",
                    "errorMessage": "Incorrect type. Expected a string in the form of an environment variable or plain text",
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "^\\$\\{?([^:}]+).*\\}?$"
                        }
                    ]
                }
            },
            "additionalProperties": false
        },
        "GooglePlay": {
            "title": "GooglePlay",
            "type": "object",
            "properties": {
                "credentials": {
                    "title": "Service account credentials",
                    "description": "The encrypted JSON key file or the encrypted contents of the JSON key file. The value can also be passed with an environment variable.",
                    "minLength": 1,
                    "type": "string"
                },
                "track": {
                    "title": "Name of the track",
                    "description": "Codemagic enables you to automatically publish your app to Google Play.",
                    "minLength": 1,
                    "type": "string"
                },
                "in_app_update_priority": {
                    "title": "Priority of the release",
                    "description": "If your application supports in-app updates, set the release priority by specifying an integer in range [0, 5]. Otherwise, in_app_update_priority can be omitted.",
                    "minimum": 0,
                    "maximum": 5,
                    "type": "integer"
                },
                "rollout_fraction": {
                    "title": "Rollout fraction",
                    "description": "Codemagic supports staged releases, allowing users to choose which fraction of the testers or users get access to the application. To release to everyone, omit the rollout_fraction field.",
                    "exclusiveMinimum": 0.0,
                    "exclusiveMaximum": 1.0,
                    "type": "number"
                },
                "changes_not_sent_for_review": {
                    "title": "Do not send changes for review",
                    "description": "Indicates that the changes in this edit will not be reviewed until they are explicitly sent for review from the Google Play Console UI.",
                    "default": false,
                    "type": "boolean"
                },
                "submit_as_draft": {
                    "title": "Create the release in draft status",
                    "description": "Indicates that the artifacts generated in the build will be uploaded to Google Play as a draft release.",
                    "default": false,
                    "type": "boolean"
                }
            },
            "required": [
                "credentials",
                "track"
            ],
            "additionalProperties": false
        },
        "FirebaseAndroidArtifactType": {
            "title": "FirebaseAndroidArtifactType",
            "description": "An enumeration.",
            "enum": [
                "aab",
                "apk"
            ],
            "type": "string"
        },
        "FirebaseType": {
            "title": "FirebaseType",
            "type": "object",
            "properties": {
                "app_id": {
                    "title": "Firebase application id",
                    "description": "Firebase application id found in Firebase application settings.",
                    "minLength": 1,
                    "type": "string"
                },
                "groups": {
                    "title": "Groups to be distributed to",
                    "description": "Test groups that the application should be distributed to.",
                    "errorMessage": "Incorrect type. Expected a list of nonempty strings",
                    "type": "array",
                    "items": {
                        "type": "string",
                        "minLength": 1
                    }
                },
                "artifact_type": {
                    "title": "Preferable Android artifact type",
                    "description": "Artifact type (aab/apk) to prioritize when uploading to Firebase App Distribution, by default app bundles are prioritized.",
                    "errorMessage": "Incorrect artifact type. Expected 'apk' or 'aab'",
                    "allOf": [
                        {
                            "$ref": "#/definitions/FirebaseAndroidArtifactType"
                        }
                    ]
                }
            },
            "required": [
                "app_id"
            ],
            "additionalProperties": false
        },
        "Firebase": {
            "title": "Firebase",
            "type": "object",
            "properties": {
                "firebase_token": {
                    "title": "Firebase access token",
                    "description": "Firebase access token generated using Firebase CLI; to receive the token use firebase login:ci with Firebase CLI installed.",
                    "minLength": 1,
                    "type": "string"
                },
                "firebase_service_account": {
                    "title": "Service account with Firebase distribution permission",
                    "description": "The content of service account file that has \"Firebase App Distribution Admin\" role.",
                    "minLength": 1,
                    "type": "string"
                },
                "ios": {
                    "title": "iOS",
                    "description": "Codemagic enables you to automatically publish your iOS app to Firebase App Distribution.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/FirebaseType"
                        }
                    ]
                },
                "android": {
                    "title": "android",
                    "description": "Codemagic enables you to automatically publish your Android app to Firebase App Distribution.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/FirebaseType"
                        }
                    ]
                }
            },
            "additionalProperties": false
        },
        "PartnerCenter": {
            "title": "PartnerCenter",
            "type": "object",
            "properties": {
                "store_id": {
                    "title": "Partner Center store ID",
                    "description": "Store ID set up on Microsoft Partner Center.",
                    "minLength": 1,
                    "type": "string"
                },
                "tenant_id": {
                    "title": "Partner Center tenant id",
                    "description": "Directory (tenant) ID in Azure AD portal.",
                    "minLength": 1,
                    "type": "string"
                },
                "client_id": {
                    "title": "Partner Center client id",
                    "description": "Application (client) ID in Azure AD portal.",
                    "minLength": 1,
                    "type": "string"
                },
                "client_secret": {
                    "title": "Partner Center client secret",
                    "description": "The value of the Azure AD app key.",
                    "minLength": 1,
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "Publishing": {
            "title": "Publishing",
            "type": "object",
            "properties": {
                "email": {
                    "title": "Email",
                    "description": "If the build finishes successfully, release notes (if passed) and the generated artifacts will be published to the provided email address(es). If the build fails, an email with a link to build logs will be sent.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Email"
                        }
                    ]
                },
                "slack": {
                    "title": "Slack",
                    "description": "Integrate Slack publishing into your Codemagic build pipeline to get notified when a build starts and receive build artifacts or logs when the build finishes. To set up publishing to Slack, you first need to connect your Slack workspace in User integrations for personal apps and in Team integrations for team apps.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Slack"
                        }
                    ]
                },
                "app_store_connect": {
                    "title": "App Store Connect",
                    "description": "Codemagic enables you to automatically publish your iOS app to App Store Connect for beta testing with TestFlight or distributing the app to users via App Store.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/AppStoreConnect"
                        }
                    ]
                },
                "google_play": {
                    "title": "Google Play",
                    "description": "Codemagic enables you to automatically publish your app to the internal, alpha, beta and production tracks on Google Play. In order to do so, you will need to set up a service account in Google Play Console and add the JSON key file to your Codemagic configuration file.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/GooglePlay"
                        }
                    ]
                },
                "firebase": {
                    "title": "Firebase",
                    "description": "Codemagic enables you to automatically publish your app to Firebase App Distribution. In order to do so, set up an account and project on Firebase and provide Codemagic with your Firebase token, Firebase app id and test groups.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Firebase"
                        }
                    ]
                },
                "partner_center": {
                    "title": "Partner Center",
                    "description": "Codemagic enables you to automatically publish your app to Microsoft Store. In order to do so, set up an account and project on Microsoft Partner Center and provide Codemagic with your store id, client id, client secret and tenant id.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/PartnerCenter"
                        }
                    ]
                },
                "scripts": {
                    "title": "Custom post-publishing scripts",
                    "description": "Add scripts to publish to any other service.",
                    "errorMessage": "Incorrect type. Expected a not empty list of strings (inline script) or dictionaries (scripts with additional fields)",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1
                            },
                            {
                                "$ref": "#/definitions/NamedScript"
                            }
                        ]
                    }
                }
            },
            "additionalProperties": false
        },
        "Workflow": {
            "title": "Workflow",
            "type": "object",
            "properties": {
                "name": {
                    "title": "Workflow name",
                    "description": "Workflow name displayed in the Codemagic UI.",
                    "type": "string"
                },
                "instance_type": {
                    "title": "Instance type",
                    "description": "Build machine type to use for the build.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/InstanceType"
                        }
                    ]
                },
                "max_build_duration": {
                    "title": "Build timeout settings",
                    "description": "By default, Codemagic builds are set to time out after 60 minutes. You can decrease or increase the maximum build duration. ",
                    "type": "integer"
                },
                "environment": {
                    "title": "Build environment",
                    "description": "Environment contains all the environment variables and enables to specify the version of Flutter, Xcode, CocoaPods, Node, npm, ndk, Java and Ruby used for building. This is also where you can add credentials and API keys required for code signing. Make sure to encrypt the values of variables that hold sensitive data.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Environment"
                        }
                    ]
                },
                "integrations": {
                    "title": "Integrations",
                    "description": "Allows using info from the integrations connected in Codemagic UI. Currently supported: app_store_connect.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Integrations"
                        }
                    ]
                },
                "cache": {
                    "title": "Cache",
                    "description": "Define the paths to be cached and stored on Codemagic.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Cache"
                        }
                    ]
                },
                "triggering": {
                    "title": "Automatic build triggering for watched branches",
                    "description": "Triggering defines the events for automatic build triggering and watched branches. If no events are defined, you can start builds only manually.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Triggering"
                        }
                    ]
                },
                "when": {
                    "title": "Conditions for build to continue",
                    "description": "All conditions below should be met in order for build to continue.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/When"
                        }
                    ]
                },
                "working_directory": {
                    "title": "Working directory",
                    "description": "Specify the default directory to run script commands. Each script will be executed inside the specified directory, unless the working directory is specified for the script itself.",
                    "type": "string"
                },
                "scripts": {
                    "title": "Build scripts",
                    "description": "Scripts specify what kind of application is built. This is where you can specify the commands to test, build and code sign your project. You can also run shell (sh) scripts directly in your .yaml file, or run scripts in other languages by defining the language with a shebang line or by launching a script file present in your repository.",
                    "errorMessage": "Incorrect type. Expected a not empty list of strings (inline script) or dictionaries (scripts with additional fields)",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1
                            },
                            {
                                "$ref": "#/definitions/NamedScript"
                            }
                        ]
                    }
                },
                "artifacts": {
                    "title": "Artifacts to be saved",
                    "description": "Configure the paths and names of the artifacts you would like to use in the following steps, e.g. for publishing, or have available for download on the build page. All paths are relative to the clone directory, but absolute paths are supported as well. You can also use environment variables in artifact patterns.\nThe pattern can match several files or folders. If it picks up files or folders with the same name, the top level file or folder name will be suffixed with _{number}.\nIf one of the patterns includes another pattern, duplicate artifacts are not created.\napk, aab, aar, ipa, app, proguard mapping (mapping.txt), flutter_drive.log, jar, zip, xarchive and dSYM.zip files will be available as separate items in the Artifacts section on the build page. The rest of the artifacts will be included in an archive with the following name pattern: {project-name}_{version}_artifacts.zip.",
                    "errorMessage": "Incorrect type. Expected a not empty list of strings, integers, floats or booleans",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1
                            },
                            {
                                "type": "integer"
                            },
                            {
                                "type": "number"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    }
                },
                "publishing": {
                    "title": "Publishing and deployment",
                    "description": "The matching artifacts will be published to the services you have configured. The available integrations currently are email, Slack, Google Play and App Store Connect. It is also possible to publish elsewhere with custom publishing scripts.",
                    "errorMessage": "Incorrect type. Expected a dictionary",
                    "allOf": [
                        {
                            "$ref": "#/definitions/Publishing"
                        }
                    ]
                },
                "labels": {
                    "title": "Build labels",
                    "description": "Define label names to easily filter builds in UI. You can use environment variable as well.",
                    "default": [],
                    "errorMessage": "Incorrect type. Expected a list of nonempty strings",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            },
            "additionalProperties": false
        }
    }
}