TL;DR; : Simple change log for Nuget Packages made with GIT Commands and Azure Devops
The NetCoreBlockly project have different versions on Nuget: https://www.nuget.org/packages/NetCore2Blockly/ . When I decide to put a new version on Nuget,it is enough to modify in the azure-pipelines.yml the
deployNuget: ‘0’
from 0 to 1 and AzureDevOps takes care of the rest ( including setting the version )
But I need also a changelog – something to show what is different between different versions . If you want to do it properly,read https://keepachangelog.com/ and then find on some tool that enforces it ( for example,https://github.com/bzumhagen/dotnet-gitchanges or https://www.npmjs.com/search?q=keywords:changelog )
For me,I wanted something simple,that generates the change log from the title of the commits . So this is my workflow
- Deploy the nuget package
 - change from 0 to 1 in the azure-pipelines.yml
 - Commit/Push to github
 - Azure DevOps starts operating,because a new push was done
 - Azure DevOps sets a new version for the project from the current date https://github.com/ignatandrei/NETCoreBlockly/blob/master/src/NetCore2Blockly/setVersion.ps1
 - Azure Devops compiles the project and generates the nupkg file
 - Azure Devops sends the pkg file to Nuget
 - Copy the version from NuGet . In this case,1.1.2020.13325959 ( the last number is trotal seconds from the stat of the year)
 - Make modifications to come back to normal
 - Tag the latest modif twith the version from NuGet
 - Modify from 0 to 1 in azure-pipelines.yml
 - Run the command git log –pretty=format:”%n #### [%s] %n Author %an on %ai %n%n hash %h %H” 1.1.2020.12824981..1.1.2020.13325959 > a.txt
 - Modify changelog.md with the results from a.txt
 - Delete the a.txt file
 - Commit/push to github
 
You can see the results at https://github.com/ignatandrei/NETCoreBlockly/blob/master/changelog.md
Leave a Reply