Skip to content

Commit d1e0e3e

Browse files
authored
chore: configure publish to maven portal (#105)
* chore: switch to publishing portal * Also update release workflow to use new uploader
1 parent 45177b5 commit d1e0e3e

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
ORG_GRADLE_PROJECT_signingPassphrase: ${{ secrets.GPG_PASSPHRASE }}
4242
with:
4343
job-id: release
44-
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository
44+
arguments: publishToMavenCentralPortal
4545
- name: Create Github release
4646
uses: actions/create-release@v1
4747
env:

build.gradle.kts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,4 @@ plugins {
33
alias(libs.plugins.android.application) apply false
44
alias(libs.plugins.jetbrains.kotlin.android) apply false
55
alias(libs.plugins.android.library) apply false
6-
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
7-
}
8-
9-
val sonatypeUsername: String? by project
10-
val sonatypePassword: String? by project
11-
12-
nexusPublishing {
13-
repositories {
14-
sonatype {
15-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
16-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
17-
username.set(sonatypeUsername)
18-
password.set(sonatypePassword)
19-
}
20-
}
216
}

unleashandroidsdk/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ plugins {
99
id("org.jetbrains.dokka") version "1.9.20"
1010
id("pl.allegro.tech.build.axion-release") version "1.18.2"
1111
jacoco
12+
id("tech.yanand.maven-central-publish").version("1.3.0")
1213
}
1314

1415
val tagVersion = System.getenv("GITHUB_REF")?.split('/')?.last()
@@ -200,3 +201,11 @@ tasks.withType<Test> {
200201
}
201202
finalizedBy(jacocoTestReport)
202203
}
204+
205+
val mavenCentralToken: String? by project
206+
207+
mavenCentral {
208+
authToken = mavenCentralToken
209+
publishingType = "AUTOMATIC"
210+
maxWait = 120
211+
}

0 commit comments

Comments
 (0)