Skip to content

Commit c79c7e3

Browse files
authored
fix maven central publishing after ossrh / nexus2 sunset (#89)
1 parent 980cbd3 commit c79c7e3

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
required: false
1919

2020
env:
21+
JAVA_VERSION: '11'
2122
JAVA_DISTRO: 'temurin'
2223

2324
jobs:
@@ -33,9 +34,7 @@ jobs:
3334
uses: actions/setup-java@v3
3435
with:
3536
distribution: ${{ env.JAVA_DISTRO }}
36-
java-version: |
37-
11
38-
21
37+
java-version: ${{ env.JAVA_VERSION }}
3938

4039
- name: Setup Gradle
4140
uses: gradle/gradle-build-action@v2.4.2
@@ -114,8 +113,8 @@ jobs:
114113
115114
- name: Release SDK
116115
env:
117-
JRELEASER_NEXUS2_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
118-
JRELEASER_NEXUS2_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
116+
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
117+
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.CENTRAL_PORTAL_TOKEN }}
119118
JRELEASER_GPG_PASSPHRASE: ${{ secrets.RELEASE_GPG_PASSPHRASE }}
120119
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.RELEASE_GPG_PUBLIC_KEY }}
121120
JRELEASER_GPG_SECRET_KEY: ${{ secrets.RELEASE_GPG_SECRET_KEY }}

sdk/build.gradle

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,10 @@ jreleaser {
142142
}
143143
deploy {
144144
maven {
145-
nexus2 {
146-
'maven-central' {
145+
mavenCentral {
146+
sonatype {
147147
active = 'ALWAYS'
148-
url = 'https://s01.oss.sonatype.org/service/local'
149-
snapshotUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots'
150-
closeRepository = true
151-
releaseRepository = true
152-
sign = true
148+
url = 'https://central.sonatype.com/api/v1/publisher'
153149
//NOTE: staging repositories added dynamically see below
154150
}
155151
}
@@ -158,7 +154,7 @@ jreleaser {
158154

159155
// adding all staging-deploy directories from subprojects
160156
subprojects.each { p ->
161-
jreleaser.deploy.maven.nexus2.'maven-central'.stagingRepository("${p.buildDir}/staging-deploy")
157+
jreleaser.deploy.maven.mavenCentral.sonatype.stagingRepository("${p.buildDir}/staging-deploy")
162158
}
163159

164160
release {

sdk/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
id 'eclipse'
2222
id 'com.diffplug.spotless' version '6.25.0'
2323
id 'maven-publish'
24-
id 'org.jreleaser' version '1.10.0'
24+
id 'org.jreleaser' version '1.19.0'
2525
}
2626

2727
}

0 commit comments

Comments
 (0)