awslabs / aws-dotnet-messaging

An AWS-native framework that simplifies the development of .NET message processing applications that use AWS services, such as SQS, SNS, and EventBridge.
https://awslabs.github.io/aws-dotnet-messaging/
Apache License 2.0
81 stars 15 forks source link

ci: add support for automated versioning and changelog creation #115

Closed philasmar closed 8 months ago

philasmar commented 8 months ago

Description of changes: This PR adds support for AutoVer which automates versioning based on change file which contributors add to their PRs/Branches to indicate the type of change they are performing as well as the changelog message. The change file looks like:

{
  "Projects": [
    {
      "Name": "AWS.Messaging",
      "Type": "Patch",
      "ChangelogMessages": [
        "The changelog message"
      ]
    }
  ]
}

As part of the normal SDLC on this repo, when we are ready to release a set of changes, we can kick off the Create Release PR workflow against the dev branch. This workflow will go through the change file and determine the proper version for the projects that need to be versioned. It will also create the changelog based on the messages in the change files. These file changes will be added to a new releases/next-release branch for which the workflow will create a PR against to be merged to dev. We will have a chance to review the release PR as a sanity check. Once we are satisfied with the versions and changelog, we can merge that PR into dev. This will trigger the workflow Sync dev and main which will check if the Release PR was successfully merged or it was closed. If the PR was successfully merged, it will sync dev and main, create a GitHub release and delete the releases/next-release branch. If the PR was closed, it will clean up the tag and branch created by AutoVer.

AutoVer is configured using the file .autover/autover.json. In that file, I have specified the projects that we want to version and I have indicated the we will use change files to determine the version and changelogs.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.