-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for github generated release notes, closes #51 #52
Add support for github generated release notes, closes #51 #52
Conversation
@@ -34,6 +35,9 @@ This plugin uses [OkHttp](http://square.github.io/okhttp/) to send a POST reques | |||
If you are using multiple GithubRelease tasks to compose a single release, the release must be published `draft=false` with the first task. Currently, the plugin cannot find an existing release if it is a draft. | |||
|
|||
## Changelog | |||
2.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 I'm not sure how strictly this repo follows semver, but as a new feature I thought a minor bump would be appropriate.
Looks good to me! Thanks for the contribution |
@BreadMoirai how do the releases happen? I'd love to start using this. |
I've published the release as 2.4.1 |
Since the plugin is published to the gradle plugin portal, only I can publish it as it's under my account currently |
Awesome thanks! I just updated the wiki as well: https://github.com/BreadMoirai/github-release-gradle-plugin/wiki#generatereleasenotes I did so some small testing locally with |
Fixes #51, which is around being able to use the generated release notes that github provides.
This is natively supported in the github API to create a release, so I just piggybacked onto that API call: https://docs.github.com/en/rest/releases/releases#create-a-release
I set the default to
false
to match what github does, and to prevent duplicate logs in situations like usingbody(changelog())
. If it is set totrue
and a body is also provided, the body will be pre-pended to the generated notes. If a name is not provided, one will be generated (I believe it uses the tag based on my limited testing).Kotlin usage:
githubRelease { generateReleaseNotes(true) }
Groovy usage:
Each teams is also able to customize the syntax and groupings of the release that is generated by github with a
.github/release.yaml
file in the repo (with no work on the plugin side). More information here: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes (<- This kind of extra info might be helpful to have for people in the wiki).I'm a first time contributor, so let me know if there's anything I missed!
I'm also happy to update the wiki with this new parameter, but it doesn't look like I have access to it.