Documentation
¶
Overview ¶
Package workflow provides workflow orchestration for multi-step releases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
Dir string // Working directory
Version string // Target version
DryRun bool // If true, don't make changes
Verbose bool // Show detailed output
Interactive bool // Enable interactive mode
JSONOutput bool // Output JSON for Claude Code
SkipChecks bool // Skip validation checks
SkipCI bool // Skip CI wait
Data map[string]string // Arbitrary data passed between steps
Output *strings.Builder // Captured output
}
Context provides context for step execution.
func NewContext ¶
NewContext creates a new workflow context.
type JSONResult ¶
type JSONResult struct {
Type string `json:"type" toon:"type"`
WorkflowName string `json:"workflow_name" toon:"workflow_name"`
Success bool `json:"success" toon:"success"`
Duration string `json:"duration" toon:"duration"`
Steps []JSONStepResult `json:"steps" toon:"steps"`
}
JSONResult represents a workflow result in structured format.
type JSONStepResult ¶
type JSONStepResult struct {
Name string `json:"name" toon:"name"`
Success bool `json:"success" toon:"success"`
Skipped bool `json:"skipped,omitempty" toon:"skipped,omitempty"`
Error string `json:"error,omitempty" toon:"error,omitempty"`
Duration string `json:"duration" toon:"duration"`
SubSteps []JSONStepResult `json:"sub_steps,omitempty" toon:"sub_steps,omitempty"`
}
JSONStepResult represents a step result in structured format.
type Step ¶
type Step struct {
Name string // Step name for display
Description string // Human-readable description
Type StepType // Step type
Required bool // If true, workflow fails if step fails
Func StepFunc // Function to execute (for StepTypeFunc)
SubSteps []Step // Sub-steps (for StepTypeComposite)
}
Step represents a single step in a workflow.
type StepFunc ¶
StepFunc is a function that executes a step. It receives the context and returns an error if the step fails.
type StepResult ¶
type StepResult struct {
Name string
Success bool
Skipped bool
Error error
Output string
Duration time.Duration
SubSteps []StepResult // Results of sub-steps (for composite)
}
StepResult represents the result of a step execution.
type Workflow ¶
Workflow defines a sequence of steps.
func ReleaseWorkflow ¶
ReleaseWorkflow creates a workflow for releasing a new version.
type WorkflowResult ¶
type WorkflowResult struct {
Name string
Success bool
Steps []StepResult
Duration time.Duration
Output string
}
WorkflowResult represents the result of a workflow execution.
func (*WorkflowResult) Summary ¶
func (wr *WorkflowResult) Summary() string
Summary returns a summary of the workflow result.
func (*WorkflowResult) ToJSON ¶
func (wr *WorkflowResult) ToJSON() JSONResult
ToJSON converts the workflow result to a JSON-serializable structure.