krontab/github_release.gradle

31 lines
882 B
Groovy
Raw Permalink Normal View History

2020-10-08 18:04:27 +06:00
private String getCurrentVersionChangelog(String version) {
2020-10-08 15:24:34 +06:00
OutputStream changelogDataOS = new ByteArrayOutputStream()
exec {
2020-10-08 17:09:08 +06:00
commandLine 'chmod', "+x", './changelog_parser.sh'
2020-10-08 18:17:12 +06:00
}
exec {
standardOutput = changelogDataOS
2020-10-08 18:04:27 +06:00
commandLine './changelog_parser.sh', "$version", 'CHANGELOG.md'
2020-10-08 15:24:34 +06: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')}"
2024-02-18 22:14:01 +06:00
owner = "InsanusMokrassar"
repo = "${rootProject.name}"
2020-10-08 15:24:34 +06:00
2024-02-18 22:14:01 +06:00
tagName = "v${project.version}"
releaseName = "${project.version}"
targetCommitish = "${project.version}"
2020-10-08 15:24:34 +06:00
2024-02-18 22:14:01 +06:00
body = getCurrentVersionChangelog("${project.version}")
2020-10-08 15:24:34 +06:00
}
}