How to do it...

Perform the following steps:

  1. By default, the releases are configured to be pushed manually. Let's configure Continuous Deployment by navigating back to the Pipeline tab and clicking on the Continuous deployment trigger, as shown in the following screenshot:
  1. As shown in the following screenshot, enable the Continuous deployment trigger and click on Save to save the changes:
  1. Navigate to Visual Studio and make some code changes, as highlighted here:
return name != null ? (ActionResult)new OkObjectResult($"Automated Build Trigger and Release test by, { name}")
: new BadRequestObjectResult("Please pass a name on the query string or in the request body");
  1. Now, check in the code with a comment, Continuous Deployment, to commit the changes to Azure DevOps. As soon as you check in the code, navigate to the Builds tab to see a new build get triggered, as shown in the following screenshot:
  1. Navigate to the Releases tab after the build is complete to see that a new release got triggered automatically, as shown in the following screenshot:
  1. Once the release process is complete, you can review the change by making a request to the HTTP Trigger using the Postman tool: