v3/tasks/release/RELEASE_NOTES_CREATION.md
The release.go script now supports a --create-release-notes flag that extracts changelog content from UNRELEASED_CHANGELOG.md and creates a clean release_notes.md file suitable for GitHub releases.
go run release.go --create-release-notes [output_path]
output_path is optional, defaults to ../../release_notes.mdUNRELEASED_CHANGELOG.md to be at ../../UNRELEASED_CHANGELOG.md (relative to the script location)The extractChangelogContent() function:
<!-- ... -->)--- separator (example entries)- and * styles)# Unreleased Changes
<!-- Comments are ignored -->
## Added
<!-- Section comments ignored -->
- Actual content preserved
- More content
## Changed
<!-- Empty sections are omitted -->
## Fixed
- Bug fixes included
---
### Example Entries:
Everything after the --- is ignored
The generated release_notes.md contains only the actual changelog entries:
## Added
- Actual content preserved
- More content
## Fixed
- Bug fixes included
- and * bullet points--check-only and --extract-changelog flags# Create release notes with default path
go run release.go --create-release-notes
# Create with custom path
go run release.go --create-release-notes /path/to/output.md
# Check if content exists
go run release.go --check-only
# Extract content to stdout
go run release.go --extract-changelog
The nightly release workflow should:
go run release.go --create-release-notes before the main release taskrelease_notes.md for the GitHub release bodyThe script will exit with status 1 if: