---
# [샘플] 성공/실패 분기 (exe-handle)
# on-success: 커맨드가 성공(exit 0)했을 때
# on-fail: 커맨드가 실패(exit 非0)했을 때
# passExitCodes: 성공으로 간주할 exit code 추가 지정

property:
  workspace: /path/to/project

pipeline:
  id: main
  workflow:
  - exe-handle:
      id: build-ios
      on-success:
      - exe: notify-success
      - exe: upload-artifact
      on-fail:
      - exe: notify-fail

commands:
- command: BuildiOS
  id: build-ios
  param:
    workspacePath: <!property.workspace>/ios/Runner.xcworkspace
    scheme: Runner
    destination: "generic/platform=iOS"

- command: Slack
  id: notify-success
  param:
    token: xoxb-your-slack-token
    channel: "#builds"
    message: "✅ iOS 빌드 성공"

- command: Slack
  id: notify-fail
  param:
    token: xoxb-your-slack-token
    channel: "#builds"
    message: "❌ iOS 빌드 실패"

- command: Print
  id: upload-artifact
  param:
    message: "아티팩트 업로드 중..."
