AL-Go Workflows
AL-Go for GitHub enables automated build and deployment pipelines for Business Central extensions. This page explains how to use AL-Go with SOD-generated code.
What is AL-Go
AL-Go is:
- GitHub Actions workflows for BC development
- Automated compilation and testing
- Continuous integration/deployment (CI/CD)
- Microsoft's recommended DevOps approach
Why Use AL-Go
Benefits
| Benefit | Description |
|---|---|
| Automated builds | Code compiles automatically on push |
| Testing | Run tests automatically |
| Quality gates | Block merges if tests fail |
| Deployment | Automate deployment to environments |
| Consistency | Same build process every time |
When to Use
Consider AL-Go when:
- Multiple developers work on code
- Need automated testing
- Want deployment automation
- Professional development workflow
Setting Up AL-Go
Repository Structure
AL-Go expects specific structure:
repository/
├── .github/
│ └── workflows/
│ └── (AL-Go workflow files)
├── .AL-Go/
│ └── settings.json
├── app.json
└── src/
└── (AL source files)
Initial Setup
- Create repository with AL-Go template
- Or add AL-Go to existing repository
- Configure settings
- Push SOD code to repository
Using AL-Go Template
- Go to AL-Go for GitHub repository
- Use as template
- Configure for your needs
- Connect to SOD
Integrating SOD with AL-Go
Repository Configuration
Set SOD's GitHub integration to push to AL-Go repository:
- Configure GitHub settings in SOD
- Point to AL-Go enabled repository
- Set appropriate folder if needed
Subfolder Placement
If your AL-Go repository expects a specific layout:
- Configure GitHub Subfolder in SOD settings
- Ensure the path matches what AL-Go scans
- Single-app mode: the source is committed directly inside the configured subfolder
- Dual-app mode: SOD always commits under
app1/andapp2/inside the configured subfolder. Configure your AL-Go layout to expect those two subfolders.
Workflow Triggers
AL-Go workflows trigger on:
- Push to main branch
- Pull requests
- Manual dispatch
Common AL-Go Workflows
CI (Continuous Integration)
Runs on every push:
- Download dependencies
- Compile extension
- Run tests (if configured)
- Report results
CD (Continuous Deployment)
Deploys to environments:
- After successful CI
- To configured environments
- With configured credentials
Pull Request Validation
On pull requests:
- Builds the code
- Runs tests
- Reports pass/fail
- Enables merge if passed
Configuring AL-Go Settings
settings.json
Basic configuration:
{
"country": "us",
"artifact": "latest",
"companyName": "Your Company"
}
Environment Variables
Configure in GitHub:
- Secrets for credentials
- Variables for settings
- Environment-specific values
Best Practices
Workflow Maintenance
- Keep workflows updated
- Review AL-Go releases
- Test workflow changes
Branch Strategy
Recommended approach:
mainfor production code- Feature branches for development
- Pull requests for review
Secret Management
- Store credentials as GitHub secrets
- Never commit credentials
- Rotate regularly
SOD to AL-Go Workflow
Typical Flow
- Develop in SOD
- Push to GitHub
- Automated build runs
- Review build results
- Deploy if successful
When Issues Occur
If build fails:
- Review build logs
- Fix issues in SOD
- Push again
- Verify build passes
Transitioning to Full Development
When to Transition
Consider moving to full VS Code development when:
- Complexity exceeds SOD capabilities
- Need custom business logic
- Multiple developers involved
- Professional development required
Transition Process
- Push final SOD code to GitHub
- Set up full AL development environment
- Clone repository to VS Code
- Continue development traditionally
- SOD no longer used (or minimal use)
Limitations
SOD-Specific
- SOD generates code, doesn't read it back
- Manual changes in repo not reflected in SOD
- One-way synchronization
AL-Go Learning Curve
- Requires understanding of workflows
- Configuration can be complex
- Debugging may be challenging
Resources
Documentation
- AL-Go for GitHub documentation
- GitHub Actions documentation
- Business Central DevOps guides
Community
- GitHub Discussions
- Business Central forums
- Microsoft documentation