Skip to content

Commit aa50585

Browse files
authored
Merge pull request #11 from salaboy/release-fix
Using Jreleaser
2 parents 2f04389 + b99004d commit aa50585

File tree

6 files changed

+301
-212
lines changed

6 files changed

+301
-212
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ jobs:
1515
timeout-minutes: 30
1616
env:
1717
JDK_VER: 11
18-
OSSRH_USER_TOKEN: ${{ secrets.OSSRH_USER_TOKEN }}
19-
OSSRH_PWD_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }}
18+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_KEY }}
19+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
20+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PWD }}
21+
JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.OSSRH_USER_TOKEN }}
22+
JRELEASER_MAVENCENTRAL_SONATYPE_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }}
2023
steps:
2124
- uses: actions/checkout@v2
2225
- name: Set up JDK 11
@@ -82,4 +85,4 @@ jobs:
8285
echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg
8386
export GPG_TTY=$(tty)
8487
gpg --batch --import private-key.gpg
85-
./gradlew publish -PGPG_KEY="$(cat private-key.gpg)" -PGPG_PWD="${{ secrets.GPG_PWD }}"
88+
./gradlew jreleaserFullRelease

client/build.gradle

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ plugins {
44
// Generate IntelliJ IDEA's .idea & .iml project files
55
id 'idea'
66
id 'maven-publish'
7-
id 'signing'
7+
// id 'signing'
88
id 'com.github.spotbugs' version '5.2.1'
9+
id 'org.jreleaser' version '1.18.0'
910
}
1011

1112
group 'io.dapr'
@@ -175,14 +176,6 @@ publishing {
175176
}
176177
}
177178

178-
signing {
179-
sign publishing.publications.mavenJava
180-
useInMemoryPgpKeys(
181-
findProperty("GPG_KEY"),
182-
findProperty("GPG_PWD")
183-
)
184-
}
185-
186179
java {
187180
withSourcesJar()
188181
withJavadocJar()
@@ -218,4 +211,24 @@ spotbugsTest {
218211
required = true
219212
}
220213
}
214+
}
215+
216+
jreleaser {
217+
signing {
218+
active = 'ALWAYS'
219+
armored = true
220+
}
221+
deploy {
222+
maven {
223+
nexus2 {
224+
'maven-central' {
225+
active = 'ALWAYS'
226+
url = 'https://s01.oss.sonatype.org/service/local'
227+
snapshotUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots'
228+
closeRepository = true
229+
releaseRepository = true
230+
}
231+
}
232+
}
233+
}
221234
}

gradle/wrapper/gradle-wrapper.jar

-15.1 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)