Skip to content

Commit

Permalink
Added github release task
Browse files Browse the repository at this point in the history
  • Loading branch information
bdpiprava committed Dec 17, 2018
1 parent 11d0451 commit 6c29573
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'co.riiid.gradle' version '0.4.2'
}

apply plugin: 'java'
apply from: 'plugin-common.gradle'
Expand Down Expand Up @@ -119,3 +122,21 @@ task deploy(type: Copy) {
from jar
into '/Users/ganeshpatil/projects/gocd/server/plugins/external'
}

githubRelease.dependsOn('assemble')

github {
owner = System.getenv('GITHUB_USER') ?: 'bob'
repo = 'kubernetes-elastic-agents'
token = System.getenv('GITHUB_TOKEN') ?: 'bad-token'
prerelease = !"No".equalsIgnoreCase(System.getenv('PRERELEASE'))
tagName = "${project.version}${prerelease ? '-exp' : ''}"
name = "${prerelease ? 'Experimental: ' : ''}${project.version}"
targetCommitish = project.gitRevision
body = """
Refer to the [changelog](https://github.com/gocd/kubernetes-elastic-agents/blob/master/CHANGELOG.md#${
project.pluginVersion.replace(".", "")
}---${new Date().format('YYYY-MM-dd')}) for the changes made in this release
""".stripIndent().trim()
assets = jar.outputs.files.files
}

0 comments on commit 6c29573

Please sign in to comment.