File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 uses : gradle/actions/setup-gradle@v4
2525
2626 - name : Publish Artifact
27- run : ./gradlew :lib:publish
27+ run : |
28+ ./gradlew jreleaserConfig
29+ ./gradlew clean
30+ ./gradlew :lib:publish
31+ ./gradlew :lib:jreleaserFullRelease
2832 env :
2933 RELEASE_VERSION : ${{ github.ref_name }}
30- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Required for GitHub Packages
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # For GitHub Packages
35+ JRELEASER_MAVENCENTRAL_USERNAME : ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
36+ JRELEASER_MAVENCENTRAL_PASSWORD : ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}
37+ JRELEASER_GPG_SECRET_KEY : ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
38+ JRELEASER_GPG_PASSPHRASE : ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change 11# This file was generated by the Gradle 'init' task.
22# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
33
4- org.gradle.configuration-cache =true
4+ org.gradle.configuration-cache =false
55
Original file line number Diff line number Diff line change 11plugins {
22 id ' java-library'
33 id ' maven-publish'
4+ id ' org.jreleaser' version ' 1.18.0'
45}
56
67repositories {
@@ -42,11 +43,33 @@ publishing {
4243 pom {
4344 name = ' Kuberesolver'
4445 description = ' gRPC name resolver for Kubernetes'
46+ url = ' https://github.com/lothar1998/kuberesolver-java'
47+ licenses {
48+ license {
49+ name = ' The Apache License, Version 2.0'
50+ url = ' https://www.apache.org/licenses/LICENSE-2.0.txt'
51+ }
52+ }
53+ developers {
54+ developer {
55+ id = ' lothar1998'
56+ name = ' Piotr Kuglin'
57+ email = ' lothar1998.dev@gmail.com'
58+ }
59+ }
60+ scm {
61+ connection = ' scm:git:git://github.com/lothar1998/kuberesolver-java.git'
62+ developerConnection = ' scm:git:ssh://git@github.com:lothar1998/kuberesolver-java.git'
63+ url = ' https://github.com/lothar1998/kuberesolver-java'
64+ }
4565 }
4666 }
4767 }
4868
4969 repositories {
70+ maven {
71+ url = layout. buildDirectory. dir(' staging-deploy' )
72+ }
5073 maven {
5174 name = " GitHubPackages"
5275 url = uri(" https://maven.pkg.github.com/lothar1998/kuberesolver-java" )
@@ -57,3 +80,21 @@ publishing {
5780 }
5881 }
5982}
83+
84+ jreleaser {
85+ signing {
86+ active = ' ALWAYS'
87+ armored = true
88+ }
89+ deploy {
90+ maven {
91+ mavenCentral {
92+ sonatype {
93+ active = ' ALWAYS'
94+ url = ' https://central.sonatype.com/api/v1/publisher'
95+ stagingRepository(' target/staging-deploy' )
96+ }
97+ }
98+ }
99+ }
100+ }
You can’t perform that action at this time.
0 commit comments