---
# [샘플] Flutter 멀티플랫폼 빌드

property:
  workspace: /path/to/flutter_project
  version: 1.0.0
  flavor: production
  platforms:
  - ios
  - android

pipeline:
  id: main
  workflow:
  - exe: git-update
  - foreach:
      iterator: <!property.platforms>
      setValue: <@property.platform>
      on-do:
      - if:
          condition-string: <!property.platform> == ios
          on-true:
          - exe: build-ios
          on-false:
          - exe: build-android
      - exe: notify-done

commands:
- command: Git
  id: git-update
  param:
    commands:
    - fetch origin
    - reset --hard origin/main

- command: BuildFlutter
  id: build-ios
  param:
    workspace: <!property.workspace>
    platform: ios
    flavor: <!property.flavor>
    additional: "--release --no-codesign"

- command: BuildFlutter
  id: build-android
  param:
    workspace: <!property.workspace>
    platform: apk
    flavor: <!property.flavor>
    additional: "--release"

- command: Print
  id: notify-done
  param:
    message: "<!property.platform> 빌드 완료"
