Overview
The CI/CD workflow runs automatically on:- Push events to
main,release/*, orfeature/*branches (excluding markdown files and most workflow files) - Manual trigger via workflow_dispatch
Workflow Jobs
Initialization
The workflow starts by initializing settings, determining which projects to build, and identifying deployment targets.Key Actions:
- Reads AL-Go settings and secrets
- Determines projects to build based on dependencies
- Identifies deployment environments
- Configures delivery targets (NuGet, Storage, etc.)
- Sets up telemetry scope
Check for Updates
Verifies if updates to AL-Go system files are available.This job runs in parallel with the build and checks whether your repository’s AL-Go system files (in
.AL-Go and .github folders) are up to date with the template repository.If updates are available, you’ll see a notification in the workflow output. Use the Update AL-Go System Files workflow to apply updates.
Build
Compiles all AL projects in the repository.Build Process:
- Runs on a matrix of projects and build modes
- Compiles apps and test apps
- Runs tests and collects results
- Performs code analysis
- Signs artifacts (if configured)
- Uses artifact cache for performance
- Validates against baseline (previous builds)
Build PowerPlatform (PTE only)
For Per-Tenant Extension repositories with PowerPlatform solutions, this job builds the PowerPlatform solution.
This job only runs if
powerPlatformSolutionFolder is configured in your repository settings.Code Analysis Upload
Processes AL code analysis results and uploads them to GitHub Security.Features:
- Downloads error logs from build artifacts
- Converts AL compiler warnings/errors to SARIF format
- Uploads to GitHub Code Scanning for visibility
Code analysis results appear in the Security tab of your repository when
trackALAlertsInGitHub is enabled.Deploy Reference Documentation
Builds and deploys AL reference documentation to GitHub Pages (if configured).This job:
- Generates documentation from AL code comments
- Builds a static site
- Deploys to GitHub Pages
Only runs on the
main branch when generateALDocArtifact is enabled in settings.Deploy
Deploys built artifacts to Business Central and PowerPlatform environments.Deployment Strategy:
- Runs for all configured CD (Continuous Deployment) environments
- Uses environment-specific authentication contexts
- Deploys apps in dependency order
- Supports both Business Central and PowerPlatform deployments
Deliver
Delivers artifacts to external delivery targets.Supported Targets:
- NuGet package repositories
- Azure Storage
- Custom delivery targets
Configuration
Required Secrets
License File
Secret:
licenseFileUrlURL to your Business Central license file for compilation.Code Signing
Secrets:
codeSignCertificateUrl, codeSignCertificatePasswordCertificate for signing app artifacts.Environment Auth
Secret:
{EnvironmentName}-AuthContext or {EnvironmentName}_AuthContextAuthentication context for deployment environments.Delivery Targets
Secrets:
nuGetContext, storageContextAuthentication for external delivery targets.Settings
Key settings in.github/AL-Go-Settings.json:
Workflow Triggers
Automatic Triggers
The workflow runs automatically on push events:Markdown files and workflow changes (except CICD.yaml itself) are ignored to prevent unnecessary builds.
Manual Trigger
Trigger manually from GitHub Actions:- Go to Actions tab
- Select CI/CD workflow
- Click Run workflow
- Select the branch and click Run workflow
Build Matrix
The workflow supports building multiple projects with different configurations:- Projects: All AL projects in the repository
- Build Modes: Default, Clean, Translated (based on configuration)
- Runners: Windows or Linux (configurable per project)
The build matrix is dynamically generated based on project dependencies and repository settings.
Deployment Process
Environment Configuration
Create GitHub Environment
In your repository settings, create a new environment (e.g., “QA”, “PROD”).
Artifacts
The workflow produces several types of artifacts:Apps
Compiled
.app files ready for deployment.Test Apps
Test application packages with test codeunits.
Build Output
Compilation logs and build information.
Test Results
JUnit XML test results and coverage reports.
Error Logs and Code Analysis
WhentrackALAlertsInGitHub is enabled:
- Compiler warnings and errors are collected during build
- SARIF file is generated with all issues
- Code Scanning alerts appear in the Security tab
- Pull requests show inline annotations for issues
Performance Optimization
Artifact Cache
The workflow uses artifact caching to speed up builds:- Dependencies are cached between builds
- Baseline artifacts from previous builds are reused
- App symbols are cached for faster compilation
Workflow Depth
Control build depth with theworkflowDepth setting:
1: Build only changed projects- Higher values: Build dependent projects up to N levels deep
Troubleshooting
Build Failures
Check the build job logs for compilation errors. Ensure all dependencies are available and license file is configured.
Deployment Failures
Verify authentication context secrets are correct and the environment is accessible. Check environment-specific logs.
Missing Updates
If update notifications appear, run the Update AL-Go System Files workflow to sync with the latest template.
Code Analysis Issues
Review the Security tab for detailed code analysis results. Configure code cops in
app.json to adjust analysis rules.Example Workflow Run
A typical CI/CD workflow execution:- Developer pushes code to
mainbranch - Workflow triggers automatically
- Projects are determined based on changes and dependencies
- Build runs in parallel for all projects
- Tests execute and results are collected
- Code analysis processes warnings and errors
- Artifacts deploy to QA environment automatically
- Delivery sends packages to NuGet
- Workflow completes with status report
The entire process typically completes in 5-15 minutes depending on project size and complexity.