Skip to content

Commit 5ba736e

Browse files
authored
.sync/Files.yml: Sync release drafter config file (#109)
Fixes #108 Commit 6e00a3d added file sync for the release drafter flow to Project Mu platform and feature repos. However, the config file used by the workflow must be local to the repo, so it needs to be synced as well. This change syncs the config file. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
1 parent 571142f commit 5ba736e

8 files changed

Lines changed: 128 additions & 7 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# NOTE: `semver:major`, `semver:minor`, and `semver:patch` can be used to force that
66
# version to roll regardless of other labels.
77
#
8+
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there
9+
# instead of the file in this repo.
10+
#
11+
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops
12+
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml
13+
#
814
# Copyright (c) Microsoft Corporation.
915
# SPDX-License-Identifier: BSD-2-Clause-Patent
1016
#

.github/workflows/ReleaseDrafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# workflow makes sense in their repo.
1111
#
1212
# The release draft configuration is defined in:
13-
# - .github/ReleaseDraft.yml
13+
# - .github/release-draft-config.yml
1414
#
1515
# Copyright (c) Microsoft Corporation.
1616
# SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -34,6 +34,6 @@ jobs:
3434
uses: release-drafter/release-drafter@v5.22.0
3535
with:
3636
# Note: Path is relative to .github/
37-
config-name: ReleaseDraft.yml
37+
config-name: release-draft-config.yml
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-draft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ on:
2828
jobs:
2929
draft:
3030
uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v1.7.4
31+
secrets: inherit

.sync/Files.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,16 @@ group:
452452
microsoft/mu_devops
453453
454454
# Leaf Workflow - Release Draft
455+
# Note: The branch name used to draft releases on in this group is
456+
# set to the value "main"
455457
- files:
456458
- source: .sync/workflows/leaf/release-draft.yml
457459
dest: .github/workflows/release-draft.yml
458460
template:
459461
trigger_branch_name: 'main'
462+
- source: .sync/workflows/config/release-draft/release-draft-config.yml
463+
dest: .github/release-draft-config.yml
460464
repos: |
461-
microsoft/mu_crypto_release
462465
microsoft/mu_devops
463466
microsoft/mu_feature_config
464467
microsoft/mu_feature_dfci
@@ -467,6 +470,18 @@ group:
467470
microsoft/mu_feature_uefi_variable
468471
microsoft/mu_tiano_platforms
469472
473+
# Leaf Workflow - Release Draft
474+
# Note: The default branch name used to draft releases on in this group is
475+
# the latest Mu release branch (e.g. "release/202208")
476+
- files:
477+
- source: .sync/workflows/leaf/release-draft.yml
478+
dest: .github/workflows/release-draft.yml
479+
template: true
480+
- source: .sync/workflows/config/release-draft/release-draft-config.yml
481+
dest: .github/release-draft-config.yml
482+
repos: |
483+
microsoft/mu_crypto_release
484+
470485
# Leaf Workflow - Scheduled Maintenance
471486
# Note: This currently sync to the same repos as the label sync since it is exclusively
472487
# performing cleanup based on labels.

.sync/Version.njk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@
3232
{# The git ref value that files dependent on this repo will use. #}
3333
{% set mu_devops = "v1.7.4" %}
3434

35+
{# The latest Project Mu release branch value. #}
36+
{% set latest_mu_release_branch = "release/202208" %}
37+
3538
{# The version of the fedora-35-build container to use. #}
3639
{% set linux_build_container = "ghcr.io/tianocore/containers/fedora-35-build:5b8a008" %}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Defines the configuration used for drafting new releases.
2+
#
3+
# IMPORTANT: Only use labels defined in the .github/Labels.yml file in this repo.
4+
#
5+
# NOTE: `semver:major`, `semver:minor`, and `semver:patch` can be used to force that
6+
# version to roll regardless of other labels.
7+
#
8+
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there
9+
# instead of the file in this repo.
10+
#
11+
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops
12+
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml
13+
#
14+
# Copyright (c) Microsoft Corporation.
15+
# SPDX-License-Identifier: BSD-2-Clause-Patent
16+
#
17+
# For more information, see:
18+
# https://github.com/release-drafter/release-drafter
19+
20+
name-template: 'v$RESOLVED_VERSION'
21+
tag-template: 'v$RESOLVED_VERSION'
22+
23+
template: |
24+
# What's Changed
25+
26+
$CHANGES
27+
28+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
29+
30+
categories:
31+
- title: '🚀 Features & ✨ Enhancements'
32+
labels:
33+
- 'type:design-change'
34+
- 'type:enhancement'
35+
- 'type:feature-request'
36+
- title: '🐛 Bug Fixes'
37+
labels:
38+
- 'type:bug'
39+
- title: '🔐 Security Impacting'
40+
labels:
41+
- 'impact:security'
42+
- title: '📖 Documentation Updates'
43+
labels:
44+
- 'type:documentation'
45+
- title: '🛠️ Submodule Updates'
46+
labels:
47+
- 'type:submodules'
48+
49+
change-template: >-
50+
<ul>
51+
<li>
52+
$TITLE @$AUTHOR (#$NUMBER)
53+
<br>
54+
<details>
55+
<summary>Change Details</summary>
56+
<blockquote>
57+
<!-- Non-breaking space to have content if body is empty -->
58+
&nbsp; $BODY
59+
</blockquote>
60+
<hr>
61+
</details>
62+
</li>
63+
</ul>
64+
65+
change-title-escapes: '\<*_&@' # Note: @ is added to disable mentions
66+
67+
# Maintenance: Keep labels organized in ascending alphabetical order - easier to scan, identify duplicates, etc.
68+
version-resolver:
69+
major:
70+
labels:
71+
- 'impact:breaking-change'
72+
- 'semver:major'
73+
minor:
74+
labels:
75+
- 'semver:minor'
76+
- 'type:design-change'
77+
- 'type:enhancement'
78+
- 'type:feature-request'
79+
patch:
80+
labels:
81+
- 'impact:non-functional'
82+
- 'semver:patch'
83+
- 'type:bug'
84+
- 'type:documentation'
85+
default: patch
86+
87+
exclude-labels:
88+
- 'type:file-sync'
89+
- 'type:notes'
90+
- 'type:question'
91+
92+
exclude-contributors:
93+
- 'uefibot'

.sync/workflows/leaf/release-draft.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ name: Update Release Draft
2525
on:
2626
push:
2727
branches:
28-
- {{ trigger_branch_name }}
28+
- {{ trigger_branch_name if trigger_branch_name else sync_version.latest_mu_release_branch }}
2929

3030
jobs:
3131
draft:
3232
uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@{{ sync_version.mu_devops }}
33+
secrets: inherit

ReadMe.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,12 @@ To see more about this flow look in these files:
149149
- The main reusable workflow file:
150150
- .github/workflows/ReleaseDrafter.yml
151151
- The configuration file for the reusable workflow:
152-
- .github/ReleaseDraft.yml
152+
- .sync/workflows/config/release-draft/release-draft-config.yml
153+
- This will be synced to .github/release-draft-config.yml in repos using release drafter
153154

154-
A Project Mu repo simply needs to sync `.sync/workflows/leaf/release-draft.yml` to their repo and adjust any parameters
155-
needed in the sync process (like repo default branch name) and the release draft workflow will run in the repo.
155+
A Project Mu repo simply needs to sync `.sync/workflows/leaf/release-draft.yml` and the config file
156+
`.sync/workflows/config/release-draft/release-draft-config.yml` to their repo and adjust any parameters needed in the
157+
sync process (like repo default branch name) and the release draft workflow will run in the repo.
156158

157159
Initial Issue Triage
158160
--------------------

0 commit comments

Comments
 (0)