.NET › CI/CD, Publishing & Deployment
What is the typical CI/CD pipeline structure for a .NET application?
BeginnerAnswer
A typical pipeline includes: restore dependencies (dotnet restore), build (dotnet build), run automated tests (dotnet test), publish deployable artifacts (dotnet publish), and deploy to a target environment (container registry, cloud platform, or server) -- often gated by required checks like code coverage thresholds, security scans, and manual approval for production deployments.
# GitHub Actions example
- run: dotnet restore
- run: dotnet build --no-restore -c Release
- run: dotnet test --no-build -c Release
- run: dotnet publish -c Release -o ./publish
- run: docker build -t myapp:${{ github.sha }} .Real-world example A team's pipeline automatically blocks merging any pull request where dotnet test fails or code coverage drops below 80%, catching regressions before they ever reach the main branch.