generated from InsanusMokrassar/KotlinMultiplatformProjectTemplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgithub_release.gradle
30 lines (24 loc) · 854 Bytes
/
github_release.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
private String getCurrentVersionChangelog() {
OutputStream changelogDataOS = new ByteArrayOutputStream()
exec {
commandLine 'chmod', "+x", './changelog_parser.sh'
}
exec {
standardOutput = changelogDataOS
commandLine './changelog_parser.sh', "${project.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 = "PlaguBotPlugins"
tagName = "v${project.version}"
releaseName = "${project.version}"
targetCommitish = "${project.version}"
body = getCurrentVersionChangelog()
}
}