-
Notifications
You must be signed in to change notification settings - Fork 26
Recipes
BreadMoirai edited this page Aug 1, 2021
·
4 revisions
githubRelease {
token getProperty('github.token')
FilenameFilter filter = { dir, filename -> filename.contains(project.version) }
releaseAssets = jar.destinationDir.listFiles filter
}
import com.github.breadmoirai.githubreleaseplugin.GithubReleaseTask
task githubCreateRelease(type: GithubReleaseTask) {
body {
"## Changelog\n" +
changelog {
executable "C:\\Program Files\\Git\\bin\\git.exe"
lastCommit 'db6b295'
}.call().readLines().each {
"- $it"
}.join('\n')
}
draft = true
}
task githubUploadTestFiles(type: GithubReleaseTask) {
dependsOn githubCreateRelease
allowUploadToExisting true
releaseAssets(files("test1.txt", "test2.txt"))
draft = true
}
tasks.githubRelease {
dependsOn githubUploadTestFiles
draft = false
}
tasks.withType(GithubReleaseTask) {
owner 'BreadMoirai'
repo 'TestRepo'
token project.findProperty('github.token') ?: ''
}
task githubRelease(type: GithubReleaseTask) {
....
}
task otherGithubRelease(type: GithubReleaseTask) {
....
}