extend release action with important notes
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 26 Nov 2025 19:27:34 +0000 (20:27 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 26 Nov 2025 19:27:34 +0000 (20:27 +0100)
.github/actions/generate-release-notes/action.yml
.github/actions/generate-release-notes/generate_notes.py
.github/workflows/auto-release.yml
.github/workflows/release.yml

index b7191c2062c5b210bea6df8957abd49ba447257d..f5bedfe27695e37203e2eb937ea5222e2d9a260d 100644 (file)
@@ -17,6 +17,10 @@ inputs:
   github-token:
     description: 'GitHub token for API access'
     required: true
+  important-notes:
+    description: 'Important notes to display at the top (breaking changes, critical info, etc.)'
+    required: false
+    default: ''
 outputs:
   release-notes:
     description: 'The complete generated release notes including frontend changes'
@@ -45,6 +49,7 @@ runs:
         CHANNEL: ${{ inputs.channel }}
         GITHUB_REPOSITORY: ${{ github.repository }}
         GITHUB_SERVER_URL: ${{ github.server_url }}
+        IMPORTANT_NOTES: ${{ inputs.important-notes }}
       run: |
         chmod +x ${{ github.action_path }}/generate_notes.py
         python3 ${{ github.action_path }}/generate_notes.py
index d3b875214791f78075e181a208e05c2fc049023e..2c8d7af3a02a729239a6ee3899401e74e15f550e 100755 (executable)
@@ -191,11 +191,26 @@ def extract_frontend_changes(prs):
 
 
 def generate_release_notes(  # noqa: PLR0915
-    config, categories, uncategorized, contributors, previous_tag, frontend_changes=None
+    config,
+    categories,
+    uncategorized,
+    contributors,
+    previous_tag,
+    frontend_changes=None,
+    important_notes=None,
 ):
     """Generate the formatted release notes."""
     lines = []
 
+    # Add important notes section first if provided
+    if important_notes and important_notes.strip():
+        lines.append("## ⚠️ Important Notes")
+        lines.append("")
+        lines.append(important_notes.strip())
+        lines.append("")
+        lines.append("---")
+        lines.append("")
+
     # Add header if previous tag exists
     if previous_tag:
         repo_url = (
@@ -310,6 +325,7 @@ def main():
     branch = os.environ.get("BRANCH")
     channel = os.environ.get("CHANNEL")
     repo_name = os.environ.get("GITHUB_REPOSITORY")
+    important_notes = os.environ.get("IMPORTANT_NOTES", "")
 
     if not all([github_token, version, branch, channel, repo_name]):
         print("Error: Missing required environment variables")  # noqa: T201
@@ -367,6 +383,7 @@ def main():
             contributors_list,
             previous_tag,
             frontend_changes_list,
+            important_notes,
         )
 
     # Output to GitHub Actions
index 3c204bb18b42fd1bbd719dfc7aaa2caf20166666..177f6b31469e01c2a4113847376c7d7ed65266bf 100644 (file)
@@ -20,6 +20,10 @@ on:
           - beta
           - stable
         default: nightly
+      important_notes:
+        description: "Important notes (breaking changes, critical info, etc.)"
+        required: false
+        type: string
 
 permissions:
   actions: write
@@ -250,6 +254,7 @@ jobs:
     with:
       version: ${{ needs.check-and-release.outputs.version }}
       channel: ${{ needs.check-and-release.outputs.channel }}
+      important_notes: ${{ inputs.important_notes }}
     secrets:
       PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
       PRIVILEGED_GITHUB_TOKEN: ${{ secrets.PRIVILEGED_GITHUB_TOKEN }}
index e6fe5f731ee99ba4d52796044ad441d14a27445e..ee8ee5b18900509ec0f3faf2b50bff2066115caa 100644 (file)
@@ -15,6 +15,10 @@ on:
           - stable
           - beta
           - nightly
+      important_notes:
+        description: "Important notes (breaking changes, critical info, etc.)"
+        required: false
+        type: string
   workflow_call:
     inputs:
       version:
@@ -25,6 +29,10 @@ on:
         description: "Release channel"
         required: true
         type: string
+      important_notes:
+        description: "Important notes (breaking changes, critical info, etc.)"
+        required: false
+        type: string
     secrets:
       PYPI_TOKEN:
         required: true
@@ -224,6 +232,7 @@ jobs:
           branch: ${{ needs.validate-and-build.outputs.branch }}
           channel: ${{ inputs.channel }}
           github-token: ${{ secrets.GITHUB_TOKEN }}
+          important-notes: ${{ inputs.important_notes }}
 
       - name: Format release title
         id: format_title