A lightweight ALM toolkit for Copilot Studio agents – CI/CD pipelines, best practices, and deployment guidance for both GitHub Actions and Azure DevOps Pipelines.
This repository provides everything you need to implement Application Lifecycle Management (ALM) for your Power Platform solutions, with a focus on Copilot Studio agents. It includes:
- 🚀 CI/CD pipelines for export, build, and deployment (GitHub Actions and Azure DevOps)
- 📁 Recommended folder structure for organizing solutions
- 📖 Step-by-step guides for common scenarios
- 🔧 Reusable scripts for automation (work across both platforms)
- Use this template – Click "Use this template" (GitHub) or import to your Azure DevOps project
- Pick your CI/CD platform – Use the workflows in
.github/workflows/or.pipelines/ - Configure authentication – Set up credentials for your Power Platform environments (see Authentication Setup)
- Export your solution – Run the export pipeline to pull your agent from the dev environment
- Deploy – Push to
mainto trigger deployment to downstream environments
💡 New to ALM for Power Platform? Start with the Getting Started Guide.
| Folder | Description |
|---|---|
.github/workflows/ |
GitHub Actions workflows (export, build & deploy, PR validation) |
.pipelines/ |
Azure DevOps pipeline definitions and shared variables |
docs/ |
Documentation and step-by-step guides |
scripts/ |
Reusable PowerShell scripts (work across both CI/CD platforms) |
solutions/ |
Your Power Platform solutions (unpacked source) |
settings/ |
Environment-specific deployment settings (per solution, per environment) |
| Workflow | Trigger | Description |
|---|---|---|
export-solution.yml |
Manual | Exports solution from dev environment and creates a PR |
build-and-deploy.yml |
Push to main |
Builds and deploys solution to target environments |
validate-pr.yml |
Pull Request | Validates solution structure and runs checks |
| Pipeline | Trigger | Description |
|---|---|---|
export-solution.yml |
Manual | Exports solution from dev environment and creates a PR |
build-and-deploy.yml |
Push to main |
Builds and deploys solution to target environments |
validate-pr.yml |
Pull Request | Validates solution structure and runs checks |
See Azure DevOps Setup for detailed configuration instructions.
- Power Platform environment(s) with Copilot Studio
- Service Principal / App Registration with appropriate permissions
- GitHub repository (this template) or Azure DevOps project with Repos + Pipelines
| Guide | Description |
|---|---|
| Getting Started | End-to-end setup for first-time users |
| Authentication Setup | Federated credentials (GitHub) and Workload Identity Federation (Azure DevOps) |
| Azure DevOps Setup | Azure DevOps-specific pipeline and environment configuration |
| Building Copilot Studio Agents | Best practices for agent development |
| Environment Configuration | Deployment settings, connection references, environment variables |
| Local Development | Running commands locally and testing |
| Troubleshooting | Common issues and solutions |
We recommend using federated credentials (no secrets to manage):
- Create an App Registration
- Add federated credentials for GitHub Actions
- Configure as Application User in Power Platform
- Add variables to GitHub
See Authentication Setup for detailed instructions.
| Variable | Description |
|---|---|
AZURE_CLIENT_ID |
Application (client) ID from App Registration |
AZURE_TENANT_ID |
Your tenant ID |
| Variable | Example | Description |
|---|---|---|
POWERPLATFORM_ENVIRONMENT_URL |
https://yourorg-test.crm.dynamics.com |
Target environment URL |
Use Workload Identity Federation (WIF) service connections in Azure DevOps (recommended) – no secrets to manage:
- Create an App Registration
- Create WIF Service Connections in your Azure DevOps project
- Configure as Application User in Power Platform
- Update
.pipelines/environment-variables.yml
See Azure DevOps Setup for detailed instructions.
| Variable | Description |
|---|---|
authorEnvironmentUrl |
Development environment URL |
authorServiceConnection |
Service connection name for dev |
Configure directly in the targetEnvironments parameter:
| Property | Description |
|---|---|
environmentUrl |
Target environment URL |
serviceConnectionName |
Service connection for that environment |
Contributions are welcome! Please read our Contributing Guide before submitting a PR.
This project is licensed under the MIT License – see the LICENSE file for details.