Using GitHub Actions in Visual Studio is as easy as right-click and Publish

Angelos Petropoulos

Angelos

Download the latest preview version of Visual Studio and try out the new ability to setup CI/CD to Azure for projects that use GitHub to host your source repository. 

With VS 16.8 Preview 3.1, for this feature to show up in Publish dialog, you need to go to Tools-Options-Environment-Preview Features and check the “GitHub Actions Support in Publish” checkbox. Rightclick on your project in Solution Explorerselect Publish from the context menu and follow the steps. If your project is using GitHub to host your source repository and the target is Azure App Service, you will get the option to use GitHub Actions. 

GitHub Actions in Visual Studio

This work is the result of talking to you, our users, about your daily coding habits. We identified an opportunity when some of you told us it is complicated and time consuming to get started with CI/CD, so you rely on Visual Studio Publish for deployment. 

Visual Studio will create the GitHub Action workflow file, including the deployment action to Azure App ServiceThe default trigger is “on push” for your code in the default branch for your repository. Visual Studio will also automatically download the publish profile from the Azure portal and store it as an encrypted secret in your GitHub repo as required by the workflow. As soon as you commit and push the generated GitHub Action workflow file, deployment to Azure begins. 

Right now, this feature is only available for ASP.NET Core projects deployed to Azure App Service and Azure Functions projects, but we are planning on expanding support in subsequent releasesWe are excited for you to try it out and tell us what you think. 

Please use Developer Community to report a problem or suggest improvements 

3 comments

Leave a comment