definitions: 
  env_versions: &env_versions
    xcode: latest 
    cocoapods: default

workflows:
  ios- release:
    name: IOS release
    labels:
     - QA
      - ${TENANT_NAME}
    instance_type: mac_mini_m1
    max_build_duration: 60
    environment:
      groups:
        - group_name
      vars:
        PUBLIC_ENV_VAR: "value here"
      flutter: stable
      xcode: latest
    cache:
      cache_paths:
        - ~/.pub-cache
    triggering:
      events:
        - push
      branch_patterns:
        - pattern: '*'
          include: true
          source: true
      cancel_previous_builds: false
    scripts:
      - name: Build for iOS         # Name of the section
        script: flutter build ios   # The script(s) to be run in that section
    artifacts:
      - build/**/outputs/bundle/**/*.aab
    publishing:
      email:
        recipients:
          - name@example.com
      scripts:
        - echo 'Post-publish script'