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'
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
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 = (
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
contributors_list,
previous_tag,
frontend_changes_list,
+ important_notes,
)
# Output to GitHub Actions
- beta
- stable
default: nightly
+ important_notes:
+ description: "Important notes (breaking changes, critical info, etc.)"
+ required: false
+ type: string
permissions:
actions: write
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 }}
- stable
- beta
- nightly
+ important_notes:
+ description: "Important notes (breaking changes, critical info, etc.)"
+ required: false
+ type: string
workflow_call:
inputs:
version:
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
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