Enumeration
WorkflowBuilder
A result builder for constructing workflow step sequences with Swift DSL syntax.
@resultBuilder enum WorkflowBuilderOverview
Supports conditionals, loops, and optional steps, enabling ergonomic programmatic workflow construction alongside YAML-defined workflows.
Usage
let workflow = Workflow("beta") {
WorkflowStep(action: "version", options: .object(["bump": .string("build")]))
WorkflowStep(action: "archive")
if uploadToTestFlight {
WorkflowStep(action: "testflight")
}
}Topics
Type Methods
static func buildArray([[WorkflowStep]]) -> [WorkflowStep]Builds from an array of step arrays (e.g. from
forloops).static func buildBlock([WorkflowStep]...) -> [WorkflowStep]Builds a step sequence from varargs.
static func buildEither(first: [WorkflowStep]) -> [WorkflowStep]Handles the first branch of an
if/else.static func buildEither(second: [WorkflowStep]) -> [WorkflowStep]Handles the second branch of an
if/else.static func buildExpression(WorkflowStep) -> [WorkflowStep]Wraps a single step in an array (to allow returning
WorkflowStepdirectly).static func buildOptional([WorkflowStep]?) -> [WorkflowStep]Handles
ifwithoutelse(returns empty if nil).