Skip to content

Commit 6c134b8

Browse files
Merge pull request #58 from cisco-system-traffic-generator/upload-jar-on-release
upload jar to github release
2 parents 6ccb25c + 08be8e4 commit 6c134b8

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
language: java
22
dist: trusty
33
jdk: oraclejdk8
4+
5+
before_deploy:
6+
- ./gradlew clean
7+
- ./gradlew -Pversion=${TRAVIS_TAG:1} jar
8+
- ./gradlew -Pversion=${TRAVIS_TAG:1} jarWithDependencies
9+
10+
deploy:
11+
- provider: releases
12+
api_key: "$GITHUB_TOKEN"
13+
file_glob: true
14+
file: "build/libs/*"
15+
skip_cleanup: true
16+
on:
17+
branch: master
18+
tags: true #Deploying only on tagged builds

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jar {
3636
from sourceSets.main.allSource
3737
}
3838

39+
task jarWithDependencies(type: Jar) {
40+
baseName = project.name + '-with-dependencies'
41+
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
42+
with jar
43+
}
44+
3945
test {
4046
testLogging {
4147
events "passed", "skipped" , "failed"

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=1.0-SNAPSHOT

0 commit comments

Comments
 (0)