File tree 4 files changed +35
-2
lines changed
4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 20
20
ORG_GRADLE_PROJECT_signingKey : ${{ secrets.SIGNING_KEY }}
21
21
ORG_GRADLE_PROJECT_signingKeyId : ${{ secrets.SIGNING_KEY_ID }}
22
22
ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.SIGNING_PASSWORD }}
23
- run : ./gradlew build publish
23
+ run : ./gradlew build publish
Original file line number Diff line number Diff line change
1
+ name : publish release version explicitly
2
+
3
+ on :
4
+ release :
5
+ types :
6
+ - published
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v2
13
+ - name : Set up JDK 11
14
+
15
+ with :
16
+ java-version : 11
17
+ - name : Build with Gradle
18
+ env :
19
+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
20
+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
21
+ ORG_GRADLE_PROJECT_signingKey : ${{ secrets.SIGNING_KEY }}
22
+ ORG_GRADLE_PROJECT_signingKeyId : ${{ secrets.SIGNING_KEY_ID }}
23
+ ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.SIGNING_PASSWORD }}
24
+ run : ./gradlew build publish -Prelease=true
Original file line number Diff line number Diff line change @@ -48,6 +48,15 @@ dependencies {
48
48
testImplementation ' io.opentracing:opentracing-mock:0.33.0'
49
49
}
50
50
51
+ // -Prelease=true will render a non-snapshot version
52
+ // All other values (including unset) will render a snapshot version.
53
+ def release = findProperty(" release" )
54
+ version = project. findProperty(" version" )
55
+
56
+ if (! release) {
57
+ version + = " -SNAPSHOT"
58
+ }
59
+
51
60
jar {
52
61
from(projectDir) { include " README.md" }
53
62
Original file line number Diff line number Diff line change 1
1
group = com.newrelic.opentracing
2
- version = 2.1.0-SNAPSHOT
2
+ version = 2.1.0
You can’t perform that action at this time.
0 commit comments