add github release mechanism

This commit is contained in:
2020-10-02 20:45:16 +06:00
parent 04e6c7b574
commit 17c6d4a889
5 changed files with 59 additions and 0 deletions

27
github_release.gradle Normal file
View File

@@ -0,0 +1,27 @@
private String getCurrentVersionChangelog() {
OutputStream changelogDataOS = new ByteArrayOutputStream()
exec {
standardOutput = changelogDataOS
commandLine './changelog_info_retriever', "$library_version", 'CHANGELOG.md'
}
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')}"
owner "InsanusMokrassar"
repo "MicroUtils"
tagName "$library_version"
releaseName "$library_version"
targetCommitish "$library_version"
body getCurrentVersionChangelog()
}
}