File tree Expand file tree Collapse file tree 3 files changed +75
-15
lines changed
Expand file tree Collapse file tree 3 files changed +75
-15
lines changed Original file line number Diff line number Diff line change 77 description : ' Release version'
88 required : true
99 dry-run :
10- description : ' Perform a dry run (skip remote operations) '
10+ description : ' Dry run'
1111 type : boolean
1212 required : true
1313 default : false
4343 GH_PACKAGES_WRITE_TOKEN : ${{ secrets.GH_PACKAGES_WRITE_TOKEN }}
4444 IPREGISTRY_API_KEY : ${{ secrets.IPREGISTRY_API_KEY }}
4545 IPREGISTRY_DATASETS_SECRET_KEY : ${{ secrets.IPREGISTRY_DATASETS_SECRET_KEY }}
46+
47+ - name : Publish artifacts to staging
48+ run : ./gradlew publish
4649
47- - name : Release with JReleaser
50+ - name : Deploy to Maven Central and Create GitHub Release
4851 env :
4952 JRELEASER_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5053 JRELEASER_MAVENCENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
5457 JRELEASER_GPG_PUBLIC_KEY : ${{ secrets.GPG_PUBLIC_KEY }}
5558 run : |
5659 mkdir -p build/jreleaser
57- ./gradlew jreleaserFullRelease ${{ inputs.dry-run && '--dryrun' || '' }}
60+ echo "=== Staging directory contents ==="
61+ find build/staging-deploy -type f -ls || echo "No staging directory found"
62+ echo "=== Running JReleaser Deploy ==="
63+ ./gradlew jreleaserDeploy --stacktrace ${{ inputs.dry-run && '--dryrun' || '' }}
64+ echo "=== Running JReleaser Release ==="
65+ ./gradlew jreleaserRelease --stacktrace ${{ inputs.dry-run && '--dryrun' || '' }}
Original file line number Diff line number Diff line change @@ -2,11 +2,18 @@ import java.text.SimpleDateFormat
22
33plugins {
44 id ' java-library'
5+ id ' maven-publish'
6+ id ' signing'
57 id ' org.jreleaser' version ' 1.16.0'
68}
79
10+ ext {
11+ copyright = ' 2019-2025 Ipregistry'
12+ }
13+
814group = ' co.ipregistry'
915version = ' 5.0.0'
16+ description = ' Official Java client for Ipregistry, a fast, reliable IP geolocation and threat data API.'
1017
1118repositories {
1219 mavenCentral()
@@ -104,3 +111,51 @@ test {
104111integrationTest {
105112 useJUnitPlatform()
106113}
114+
115+ publishing {
116+ publications {
117+ maven(MavenPublication ) {
118+ groupId = ' co.ipregistry'
119+ artifactId = ' ipregistry-client'
120+ from components. java
121+
122+ pom {
123+ name = ' Ipregistry Client'
124+ description = ' Official Java client for Ipregistry, a fast, reliable IP geolocation and threat data API.'
125+ url = ' https://github.com/ipregistry/ipregistry-java'
126+
127+ licenses {
128+ license {
129+ name = ' The Apache License, Version 2.0'
130+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
131+ }
132+ }
133+
134+ developers {
135+ developer {
136+ name = ' Ipregistry Team'
137+ organizationUrl = ' https://ipregistry.co'
138+ }
139+ }
140+
141+ scm {
142+ connection = ' scm:git:git://github.com/ipregistry/ipregistry-java.git'
143+ developerConnection = ' scm:git:ssh://github.com:ipregistry/ipregistry-java.git'
144+ url = ' https://github.com/ipregistry/ipregistry-java/tree/main'
145+ }
146+ }
147+ }
148+ }
149+
150+ repositories {
151+ maven {
152+ url = layout. buildDirectory. dir(' staging-deploy' )
153+ }
154+ }
155+ }
156+
157+ // No signing configuration in build.gradle - JReleaser will handle it
158+
159+ jreleaser {
160+ configFile = file(' jreleaser.yml' )
161+ }
Original file line number Diff line number Diff line change 88 - Ipregistry Team
99 license : Apache-2.0
1010 inceptionYear : 2019
11- website : https://github.com/ipregistry/ipregistry-java
12- docsUrl : https://ipregistry.co/docs
11+ links :
12+ homepage : https://github.com/ipregistry/ipregistry-java
13+ documentation : https://ipregistry.co/docs
1314 copyright : 2019-2025 Ipregistry
1415 vendor : Ipregistry
1516
@@ -39,16 +40,12 @@ deploy:
3940 stagingRepositories :
4041 - build/staging-deploy
4142 applyMavenCentralRules : true
42- closeRepository : true
43- releaseRepository : true
44-
45- distributions :
46- ipregistry-client :
47- type : JAVA_BINARY
48- artifacts :
49- - path : build/libs/{{distributionName}}-{{projectVersion}}.jar
50- - path : build/libs/{{distributionName}}-{{projectVersion}}-sources.jar
51- - path : build/libs/{{distributionName}}-{{projectVersion}}-javadoc.jar
43+ connectTimeout : 300
44+ readTimeout : 1800
45+ maxRetries : 60
46+ retryDelay : 60
47+ skipDeployment : false
48+ failOnExistingDeployment : false
5249
5350signing :
5451 active : ALWAYS
You can’t perform that action at this time.
0 commit comments