From: Marcel van der Veldt Date: Wed, 26 Nov 2025 19:27:34 +0000 (+0100) Subject: extend release action with important notes X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=dd108d00b2737ed68936650a387344ccaddbbe22;p=music-assistant-server.git extend release action with important notes --- diff --git a/.github/actions/generate-release-notes/action.yml b/.github/actions/generate-release-notes/action.yml index b7191c20..f5bedfe2 100644 --- a/.github/actions/generate-release-notes/action.yml +++ b/.github/actions/generate-release-notes/action.yml @@ -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 diff --git a/.github/actions/generate-release-notes/generate_notes.py b/.github/actions/generate-release-notes/generate_notes.py index d3b87521..2c8d7af3 100755 --- a/.github/actions/generate-release-notes/generate_notes.py +++ b/.github/actions/generate-release-notes/generate_notes.py @@ -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 diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 3c204bb1..177f6b31 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6fe5f73..ee8ee5b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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