File tree Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 2020 ORG_GRADLE_PROJECT_signingKey : ${{ secrets.SIGNING_KEY }}
2121 ORG_GRADLE_PROJECT_signingKeyId : ${{ secrets.SIGNING_KEY_ID }}
2222 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+ uses : actions/setup-java@v1.3.0
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 {
4848 testImplementation ' io.opentracing:opentracing-mock:0.33.0'
4949}
5050
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+
5160jar {
5261 from(projectDir) { include " README.md" }
5362
Original file line number Diff line number Diff line change 11group = 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