GenerateWorkflowFiles
Interface: IGenerateWorkflowFiles
Package: DecSm.Atom.Workflows
The GenerateWorkflowFiles target generates CI/CD configuration files from your workflow definitions.
Alias
Gen — you can run this target with dotnet run -- Gen.
What It Does
- Resolves each
WorkflowDefinitionin your build'sWorkflowsproperty. - Analyses the target dependency graph, artifact dependencies, and variable dependencies.
- Maps targets into jobs and creates a platform-neutral
WorkflowModel. - Invokes each registered
WorkflowFileWriter(one per platform type) to render and write the YAML files.
Generated File Locations
| Platform | Output Directory |
|---|---|
| GitHub Actions | .github/workflows/ |
| Azure DevOps | Project root (pipeline YAML) |
Usage
dotnet run -- GenerateWorkflowFiles
# or
dotnet run -- Gen
Requirements
Your build must:
- Inherit from
WorkflowBuildDefinition(not justBuildDefinition). - Override the
Workflowsproperty with at least one definition. - Implement a platform module (
IGithubWorkflows,IDevopsWorkflows, or both).
Outdated File Detection
The WorkflowLifecycleHook checks on every build whether the files on disk are up to date with the current definitions.
If not, it warns or fails the build, prompting you to re-run Gen.