MicroUtils/github_release.gradle

31 lines
837 B
Groovy
Raw Permalink Normal View History

2020-10-02 14:45:16 +00:00
private String getCurrentVersionChangelog() {
OutputStream changelogDataOS = new ByteArrayOutputStream()
2020-10-16 15:36:01 +00:00
exec {
commandLine 'chmod', "+x", './changelog_parser.sh'
}
2020-10-02 14:45:16 +00:00
exec {
standardOutput = changelogDataOS
2020-10-16 15:36:01 +00:00
commandLine './changelog_parser.sh', "${project.version}", 'CHANGELOG.md'
2020-10-02 14:45:16 +00:00
}
return changelogDataOS.toString().trim()
}
if (new File(projectDir, "secret.gradle").exists()) {
apply from: './secret.gradle'
apply plugin: "com.github.breadmoirai.github-release"
githubRelease {
token "${project.property('GITHUB_RELEASE_TOKEN')}"
2020-10-16 15:38:31 +00:00
owner "InsanusMokrassar"
2020-10-16 15:39:52 +00:00
repo "MicroUtils"
2020-10-02 14:45:16 +00:00
2022-06-30 04:12:54 +00:00
tagName "v${project.version}"
2020-10-16 15:36:01 +00:00
releaseName "${project.version}"
targetCommitish "${project.version}"
2020-10-02 14:45:16 +00:00
body getCurrentVersionChangelog()
}
}