File tree Expand file tree Collapse file tree 3 files changed +46
-55
lines changed
Expand file tree Collapse file tree 3 files changed +46
-55
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Publish to Maven Central
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Set up Java
16+ uses : actions/setup-java@v4
17+ with :
18+ java-version : 8
19+ distribution : ' zulu'
20+ cache : gradle
21+
22+ - name : Check release validity
23+ run : bash .github/scripts/check-release.sh
24+
25+ - name : Grant execute permission for gradlew
26+ run : chmod +x gradlew
27+
28+ - name : Publish to Maven Central via Central Portal
29+ run : |
30+ ./gradlew \
31+ uploadAllPublicationsToProjectLocalRepository \
32+ zipMavenCentralPortalPublication \
33+ releaseMavenCentralPortalPublication
34+ env :
35+ MAVEN_CENTRAL_PORTAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
36+ MAVEN_CENTRAL_PORTAL_PASSWORD : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
37+ ORG_GRADLE_PROJECT_signingKey : ${{ secrets.SIGNING_KEY }}
38+ ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.SIGNING_PASSWORD }}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ plugins {
1212 id ' maven-publish'
1313 id ' signing'
1414 id ' jacoco'
15- id ' io.github.gradle-nexus. publish-plugin ' version " 2 .0.0 "
15+ id ' org.danilopianini. publish-on-central ' version " 8 .0.7 "
1616 id " com.diffplug.spotless" version " 6.13.0"
1717}
1818
@@ -170,22 +170,16 @@ publishing {
170170 }
171171}
172172
173- nexusPublishing {
174- packageGroup = " com.meilisearch"
175-
176- repositories {
177- sonatype {
178- nexusUrl. set(uri(" https://oss.sonatype.org/service/local/" ))
179-
180- username = System . getenv(' OSSRH_USERNAME' )
181- password = System . getenv(' OSSRH_PASSWORD' )
182- stagingProfileId = System . getenv(' SONATYPE_STAGING_PROFILE_ID' )
183- }
184- }
173+ // New Maven Central Portal publishing configuration
174+ publishOnCentral {
175+ repoOwner. set(" meilisearch" )
176+ projectDescription. set(" Meilisearch Java SDK" )
185177}
186178
187179signing {
188- sign publishing. publications. mavenJava
180+ val signingKey : String ? by project // PGP private key (ASCII-armored string)
181+ val signingPassword : String ? by project // PGP key passphrase
182+ useInMemoryPgpKeys(signingKey, signingPassword)
189183}
190184
191185javadoc {
You can’t perform that action at this time.
0 commit comments