githubReleaseNotes top-level property
The Markdown-formatted release notes to use for the GitHub release.
By default, this looks for a CHANGELOG.md
file at the root of the
repository and uses the portion between the first and second level-2 ##
headers. It throws a FormatException if the CHANGELOG doesn't begin with
##
followed by version.
If this is set to null
, or by default if no CHANGELOG.md
exists, no
release notes will be added to the GitHub release.
Implementation
final githubReleaseNotes = InternalConfigVariable.fn<String?>(() {
if (!File("CHANGELOG.md").existsSync()) return null;
return lastChangelogSection(File("CHANGELOG.md").readAsStringSync(), version,
sourceUrl: "CHANGELOG.md") +
"\n\n"
"See the [full changelog](https://github.com/$githubRepo/blob/"
"master/CHANGELOG.md#${version.toString().replaceAll(".", "")}) "
"for changes in earlier releases.";
});