def METHOD_NAME(workflow_file: WorkflowFile, steps: List[str]) -> List[str]:
    """Return a list of all inputs and outputs that must be committed."""
    selected_steps = [s for s in workflow_file.steps if s.name in steps] if steps else workflow_file.steps
    return [io.path for step in selected_steps for io in itertools.chain(step.inputs, step.outputs) if io.persist]