-
Notifications
You must be signed in to change notification settings - Fork 11
/
release.gradle
43 lines (39 loc) · 1.8 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
// docs: https://plugins.gradle.org/docs/publish-plugin
gradlePlugin {
website = 'https://github.com/shipkit/shipkit-changelog'
vcsUrl = 'https://github.com/shipkit/shipkit-changelog.git'
plugins {
changelog {
id = 'org.shipkit.shipkit-changelog'
implementationClass = 'org.shipkit.changelog.ChangelogPlugin'
displayName = 'Shipkit changelog plugin'
description = 'Generates changelog based on ticked IDs found in commit messages and Github pull request information'
tags.addAll('ci', 'shipkit', 'changelog')
}
githubRelease {
id = 'org.shipkit.shipkit-github-release'
implementationClass = 'org.shipkit.github.release.GithubReleasePlugin'
displayName = 'Shipkit Github release plugin'
description = 'Posts a release to Github using the REST API'
tags.addAll('ci', 'shipkit', 'github', 'release')
}
}
}
ext.'gradle.publish.key' = System.getenv('GRADLE_PUBLISH_KEY')
ext.'gradle.publish.secret' = System.getenv('GRADLE_PUBLISH_SECRET')
if (ext.'gradle.publish.key' && ext.'gradle.publish.secret') {
println "Gradle Plugin Portal environment variables: " +
"key=${ext.'gradle.publish.key'.substring(0, 3)}, secret=${ext.'gradle.publish.secret'.substring(0, 3)}"
}
tasks.named("generateChangelog") {
previousRevision = project.ext.'shipkit-auto-version.previous-tag'
githubToken = System.getenv("GITHUB_TOKEN")
repository = "shipkit/shipkit-changelog"
}
tasks.named("githubRelease") {
dependsOn tasks.named("generateChangelog")
repository = "shipkit/shipkit-changelog"
changelog = tasks.named("generateChangelog").get().outputFile
newTagRevision = System.getenv("GITHUB_SHA")
githubToken = System.getenv("GITHUB_TOKEN")
}