In this article, I am going to show how we can do Azure DevOps CI/CD Step by Step.
Steps Involved in this article are listed below:
Step 1: Create your Visual Studio Solution.
Step 2: Check in your code in a code repository (I am going to use Git here. https://github.com)
Step 3: Create an Organization -> Project in your Azure DevOps account (https://dev.azure.com)
Step 4: Create Pipeline (Build & Release) in you Azure DevOps Project.
Step 5: Add Stages (Dev/QA/Prod) in your Release Pipeline.
Step 6: Make changes in your code and do check in (Push) -> and check CI/CD is working fine.
Now we will learn all steps in detail.
Step 1: Keep ready your Visual Studio solution. In my case I am going to create a Sample ASP.NET core application. Where Index.cshtml, I am showing some static text.
My HomeController(Index.cshtml output is):

Image 1.
Step 2: Push your code in Git Repository (You can use any code repository)
Login: https://github.com/

Image 2.
Create a New Code repository.

Image 3.

Image 4.
Now Time to add your code to Git Newly created Repository.
Go to your Visual Studio Solution => Code Containing Folder:

Image 5.

Image 6.

Image 7.
echo "# TestDemo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/...../TestDemo.git
git push -u origin master

Image 8.
Step 3: Login https://dev.azure.com
Here create a New Organization:

Image 9.

Image 10.
Click on Continue.

Image 11.
Now time to create a New Project under your Organization. For this click on +Create Project

Image 12.

Image 13.
Click on Create. Your Dev.Azure.com account will look like below:

Image 14.
Once your project is ready, you will redirect to below window.

Image 15.

Image 16.
Here under Pipelines -> Build -> New Pipeline.

Image 17.
Here click on "Use the Classic Editor"

Image 18.
Here We need to select our code repository. As we have our code in GitHub so select GitHub here and Authorize using OAuth here.
After Authorizing, Select your Code Repository and branch like below:

Image 19.

Image 20.

Image 21.

Image 22.

Image 23.

Image 24.

Image 25.

Image 26.

Image 27.

Image 28.

Image 29.

Image 30.
Now check your build pipeline. It will look like below:

Image 31.
Our Build Pipeline is ready. Now time is to create Release Pipeline. Therefore, as per our application requirement we have a Web Application. So we will deploy this application into 3 different environments ie: Dev, QA and PROD.
Before creating Release pipeline, we will create 3 Web Application as below from Azure Portal:

Image 32
Now time to create Release Pipeline:
Go to https://dev.azure.com/amster777/DevOpsDemo => Pipeline => Release

Image 33.
By clicking on New Pipeline below window will open.

Image 34.
Here search Azure App Service Deployment and Apply.
Give a name to your stage.

Image 35.
Now add an Artifact in your release pipeline.

Image 36.
Here select your Project, Source, Default Version and Source Alias.

Image 37.
From below screen option, Enable Continuous Deployment.

Image 38.
Now Click to '1 Job, 1 Task' in DEV stage for configuring the DEV environment so that if a new build is there it auto deploys on the DEV environment.

Image 39.
Select above setting and leave rest of the all as default.
Now add QA and Prod Stages as well.

Image 40.

Image 41.
You can add Pre or Post deployment approval.

Image 42.
Now time to trigger First release.

Image 43.

Image 44.
Release Succeeded for DEV & QA and waiting approval for PROD.

Image 45.
Now check your DEV and QA environment.

Image 46.
Now Make some changes in your code and do commit your code:

Image 47.
Once commit done, Automatic build and release pipeline will trigger.