From b5bc5945158a0de9f066fee0e6a4566ea6b5462b Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Wed, 20 Nov 2024 16:57:17 -0500 Subject: [PATCH] Update release drafter for dev branches (#1224) ## Description This change is currently being prototyped in Mu Basecore. Further changes may be made before syncing to other repos. During this time anyone making releases should pay careful attention to the versions and notes drafted and report any issues. The `release-drafter` action takes some inputs by config file so a couple new config files are added. These originate from a single copy (template) of the file in mu_devops so we'd still only be maintaining one actual release drafter config file. --- A release will be drafted for the dev branch and the release branch. The releases are differentiated by both their release title and tag. - Release Branch - Title: `release-v` - Tag: `v` - Dev Branch - Title: `dev-v` - Tag: `dev-v` Note that the tag for the release branch follows the same convention as existing release tags. The "release branch" release includes all pull requests made to the dev branch with the `type:backport` label since the last "dev branch" release. For this reason, the "dev branch" and "release branch" should be released at the same time. Then, this effectively results in the "release branch" having all relevant changes since the last release. The "dev branch" release will be based at the same point in history as the "release branch" release but include all changes not just those with the `type:backport` label. The "release branch" release for the current release branch should be marked as "latest". For example, if "release/202311" and "release/202405" exist, the "release/202405" "release branch" release should be marked as latest when making the release. When making releases, the "dev branch" release should be made first and then the "release branch" release. - [ ] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [ ] Backport to release branch? ## How This Was Tested - Generate "dev branch" and "release branch" on fork with various combinations of changes. ## Integration Instructions N/A Signed-off-by: Michael Kubacki --- .github/release-draft-config-n-1-dev.yml | 100 +++++++++++++++++++++++ .github/release-draft-config-n-1.yml | 7 +- .github/release-draft-config-n-dev.yml | 100 +++++++++++++++++++++++ .github/release-draft-config-n.yml | 7 +- .github/workflows/release-draft.yml | 9 +- 5 files changed, 214 insertions(+), 9 deletions(-) create mode 100644 .github/release-draft-config-n-1-dev.yml create mode 100644 .github/release-draft-config-n-dev.yml diff --git a/.github/release-draft-config-n-1-dev.yml b/.github/release-draft-config-n-1-dev.yml new file mode 100644 index 0000000000..7867567942 --- /dev/null +++ b/.github/release-draft-config-n-1-dev.yml @@ -0,0 +1,100 @@ +# Defines the configuration used for drafting new releases. +# +# IMPORTANT: Only use labels defined in the .github/Labels.yml file in this repo. +# +# NOTE: `semver:major`, `semver:minor`, and `semver:patch` can be used to force that +# version to roll regardless of other labels. +# +# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there +# instead of the file in this repo. +# +# - Mu DevOps Repo: https://github.com/microsoft/mu_devops +# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# For more information, see: +# https://github.com/release-drafter/release-drafter + +name-template: 'dev-v$RESOLVED_VERSION' +tag-template: 'dev-v$RESOLVED_VERSION' + +commitish: refs/heads/dev/202311 +filter-by-commitish: true + +template: | + # What's Changed + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION + +categories: + - title: '⚠️ Breaking Changes' + labels: + - 'impact:breaking-change' + - title: '🚀 Features & ✨ Enhancements' + labels: + - 'type:design-change' + - 'type:enhancement' + - 'type:feature-request' + - title: '🐛 Bug Fixes' + labels: + - 'type:bug' + - title: '🔐 Security Impacting' + labels: + - 'impact:security' + - title: '📖 Documentation Updates' + labels: + - 'type:documentation' + - title: '🛠️ Submodule Updates' + labels: + - 'type:submodules' + +change-template: >- +
    +
  • + $TITLE @$AUTHOR (#$NUMBER) +
    +
    + Change Details +
    + +   $BODY +
    +
    +
    +
  • +
+ +change-title-escapes: '\<*_&@' # Note: @ is added to disable mentions + +# Maintenance: Keep labels organized in ascending alphabetical order - easier to scan, identify duplicates, etc. +version-resolver: + major: + labels: + - 'impact:breaking-change' + - 'semver:major' + minor: + labels: + - 'semver:minor' + - 'type:design-change' + - 'type:enhancement' + - 'type:feature-request' + patch: + labels: + - 'impact:non-functional' + - 'semver:patch' + - 'type:bug' + - 'type:documentation' + default: patch + +exclude-labels: + - 'type:dependabot' + - 'type:file-sync' + - 'type:notes' + - 'type:question' + +exclude-contributors: + - 'uefibot' diff --git a/.github/release-draft-config-n-1.yml b/.github/release-draft-config-n-1.yml index fcf38acfbd..027e407687 100644 --- a/.github/release-draft-config-n-1.yml +++ b/.github/release-draft-config-n-1.yml @@ -17,11 +17,12 @@ # For more information, see: # https://github.com/release-drafter/release-drafter -name-template: 'v$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' +name-template: 'dev-v$RESOLVED_VERSION' +tag-template: 'dev-v$RESOLVED_VERSION' -commitish: refs/heads/release/202311 +commitish: refs/heads/dev/202311 filter-by-commitish: true +include-labels: ["type:backport"] template: | # What's Changed diff --git a/.github/release-draft-config-n-dev.yml b/.github/release-draft-config-n-dev.yml new file mode 100644 index 0000000000..30600b1d22 --- /dev/null +++ b/.github/release-draft-config-n-dev.yml @@ -0,0 +1,100 @@ +# Defines the configuration used for drafting new releases. +# +# IMPORTANT: Only use labels defined in the .github/Labels.yml file in this repo. +# +# NOTE: `semver:major`, `semver:minor`, and `semver:patch` can be used to force that +# version to roll regardless of other labels. +# +# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there +# instead of the file in this repo. +# +# - Mu DevOps Repo: https://github.com/microsoft/mu_devops +# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# For more information, see: +# https://github.com/release-drafter/release-drafter + +name-template: 'dev-v$RESOLVED_VERSION' +tag-template: 'dev-v$RESOLVED_VERSION' + +commitish: refs/heads/dev/202405 +filter-by-commitish: true + +template: | + # What's Changed + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION + +categories: + - title: '⚠️ Breaking Changes' + labels: + - 'impact:breaking-change' + - title: '🚀 Features & ✨ Enhancements' + labels: + - 'type:design-change' + - 'type:enhancement' + - 'type:feature-request' + - title: '🐛 Bug Fixes' + labels: + - 'type:bug' + - title: '🔐 Security Impacting' + labels: + - 'impact:security' + - title: '📖 Documentation Updates' + labels: + - 'type:documentation' + - title: '🛠️ Submodule Updates' + labels: + - 'type:submodules' + +change-template: >- +
    +
  • + $TITLE @$AUTHOR (#$NUMBER) +
    +
    + Change Details +
    + +   $BODY +
    +
    +
    +
  • +
+ +change-title-escapes: '\<*_&@' # Note: @ is added to disable mentions + +# Maintenance: Keep labels organized in ascending alphabetical order - easier to scan, identify duplicates, etc. +version-resolver: + major: + labels: + - 'impact:breaking-change' + - 'semver:major' + minor: + labels: + - 'semver:minor' + - 'type:design-change' + - 'type:enhancement' + - 'type:feature-request' + patch: + labels: + - 'impact:non-functional' + - 'semver:patch' + - 'type:bug' + - 'type:documentation' + default: patch + +exclude-labels: + - 'type:dependabot' + - 'type:file-sync' + - 'type:notes' + - 'type:question' + +exclude-contributors: + - 'uefibot' diff --git a/.github/release-draft-config-n.yml b/.github/release-draft-config-n.yml index b4fd801fee..1ea9bbae46 100644 --- a/.github/release-draft-config-n.yml +++ b/.github/release-draft-config-n.yml @@ -17,11 +17,12 @@ # For more information, see: # https://github.com/release-drafter/release-drafter -name-template: 'v$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' +name-template: 'dev-v$RESOLVED_VERSION' +tag-template: 'dev-v$RESOLVED_VERSION' -commitish: refs/heads/release/202405 +commitish: refs/heads/dev/202405 filter-by-commitish: true +include-labels: ["type:backport"] template: | # What's Changed diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index dbe5cb9a8e..bc0278e967 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -23,14 +23,17 @@ name: Update Release Draft on: push: branches: - - release/202405 + - dev/202405 jobs: - draft: + dev_draft: + name: Draft Releases permissions: contents: write pull-requests: write - uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v12.2.0 + # The "release_drafter_update_for_release_branches" branch is temporarily being used to test release + # drafter changes on that branch in Mu Basecore before merging them into the main branch. + uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@release_drafter_update_for_release_branches secrets: inherit