Create GitHub releases using `spotless-changelog` by renovate[bot] · Pull Request #2196 · diffplug/spotless · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/deploy.yml
12 changes: 9 additions & 3 deletions gradle/changelog.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
String kind
String releaseTitle
if (project.name == 'plugin-gradle') {
kind = 'gradle'
releaseTitle = 'Gradle Plugin'
} else if (project.name == 'plugin-maven') {
kind = 'maven'
releaseTitle = 'Maven Plugin'
} else {
assert project == rootProject
kind = 'lib'
releaseTitle = 'Lib'
}

// the root project and plugins have their own changelogs
Expand All @@ -18,13 +22,15 @@ spotlessChangelog {
branch 'release'
tagPrefix "${kind}/"
commitMessage "Published ${kind}/{{version}}" // {{version}} will be replaced
tagMessage "${kind} v{{version}}\n\n{{changes}}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ${kind} v{{version}}\n looks redundant.

image image

runAfterPush "gh release create ${kind}/{{version}} --title '${releaseTitle} v{{version}}' --notes-from-tag"
Comment on lines +25 to +26

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! TIL.


if (kind == 'gradle') {
forceNextVersion '7.0.0.BETA1'
forceNextVersion '7.0.0.BETA2'
} else if (kind == 'maven') {
forceNextVersion '2.44.0.BETA1'
forceNextVersion '2.44.0.BETA2'
} else {
forceNextVersion '3.0.0.BETA1'
forceNextVersion '3.0.0.BETA2'
}
}

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle