Skip to content

Commit 6ce4334

Browse files
fix: release 9.5.0
Co-authored-by: Saikrishna321 <saikrishna321@yahoo.com>
1 parent 6cfef35 commit 6ce4334

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Publish package to the Maven Central Repository
22
on:
3-
release:
4-
types: [created]
3+
push:
4+
branches:
5+
- release/mavenCentral
56
jobs:
67
publish:
78
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ classes/
1717
/.settings
1818
.classpath
1919
.project
20+
.vscode

build.gradle

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ plugins {
99
id 'signing'
1010
id 'org.owasp.dependencycheck' version '12.1.3'
1111
id 'com.gradleup.shadow' version '8.3.7'
12+
id 'org.jreleaser' version '1.19.0'
1213
}
1314

1415
repositories {
1516
mavenCentral()
1617

1718
if (project.hasProperty("isCI")) {
1819
maven {
19-
url uri('https://oss.sonatype.org/content/repositories/snapshots/')
20+
url uri('https://central.sonatype.com/api/v1/publisher')
2021
mavenContent {
2122
snapshotsOnly()
2223
}
@@ -160,13 +161,7 @@ publishing {
160161
}
161162
repositories {
162163
maven {
163-
credentials {
164-
username = System.getenv("MAVEN_USERNAME")
165-
password = System.getenv("MAVEN_PASSWORD")
166-
}
167-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
168-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/'"
169-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
164+
url = layout.buildDirectory.dir('staging-deploy')
170165
}
171166
}
172167
}
@@ -179,6 +174,24 @@ signing {
179174
sign publishing.publications.mavenJava
180175
}
181176

177+
jreleaser {
178+
signing {
179+
active = 'ALWAYS'
180+
armored = true
181+
}
182+
deploy {
183+
maven {
184+
mavenCentral {
185+
sonatype {
186+
active = 'ALWAYS'
187+
url = 'https://central.sonatype.com/api/v1/publisher'
188+
stagingRepository('build/staging-deploy')
189+
}
190+
}
191+
}
192+
}
193+
}
194+
182195
wrapper {
183196
gradleVersion = '8.14'
184197
distributionType = Wrapper.DistributionType.ALL

0 commit comments

Comments
 (0)