Workflows Overview
Workflows are an optional layer on top of the base build system. They let you define how your targets map to CI/CD jobs and automatically generate the platform-specific YAML files for GitHub Actions and Azure DevOps Pipelines.
When Do You Need Workflows?
Use workflows when you want Atom to generate your CI/CD configuration. If you only run builds locally or maintain
your YAML by hand, stick with BuildDefinition.
Enabling Workflows
Inherit from
WorkflowBuildDefinitioninstead ofBuildDefinition:[BuildDefinition] [GenerateEntryPoint] internal partial class Build : WorkflowBuildDefinition { // ... }Override the
Workflowsproperty to declare your pipelines.Add a platform module (
DecSm.Atom.Module.GithubWorkflowsorDecSm.Atom.Module.DevopsWorkflows) so Atom knows which YAML format to emit.Run
dotnet run -- GenerateWorkflowFiles(alias:Gen) to write the files.
What WorkflowBuildDefinition Adds
WorkflowBuildDefinition extends BuildDefinition with:
| Feature | Description |
|---|---|
Workflows property |
An IReadOnlyList<WorkflowDefinition> describing each CI/CD pipeline. |
IGenerateWorkflowFiles |
The GenerateWorkflowFiles target that writes YAML. |
WorkflowGenerator |
Resolves the build model into a platform-neutral workflow model. |
WorkflowResolver |
Analyses target dependencies, artifacts, and variables to build the job graph. |
WorkflowLifecycleHook |
A lifecycle hook that warns when generated files are outdated. |
How Generation Works
- The
WorkflowResolverexamines yourWorkflowsdefinitions and your target dependency graph. - It groups targets into jobs, splitting on artifact/variable boundaries (since those require separate CI jobs).
- The
WorkflowGeneratormaps each job to aWorkflowModel. - A platform-specific
WorkflowFileWriter(e.g. for GitHub Actions or Azure DevOps) renders the model to YAML and writes it to disk.