diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4c411d3d7..744d4a995 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -31,6 +31,12 @@ jobs: fail-fast: false runs-on: ${{ matrix.os }} steps: + - name: Check Nexus access + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + run: | + curl -u $OSSRH_USERNAME:$OSSRH_TOKEN https://oss.sonatype.org/service/local/repositories/releases/content/ - name: "Validate Gradle Wrapper" run: pwd diff --git a/build.gradle.kts b/build.gradle.kts index 53f297c0f..5ffb1c9e4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,6 +15,15 @@ buildscript { gradlePluginPortal() google() mavenCentral() + maven { + name = "OSSRH" + url = uri("hhttps://oss.sonatype.org/service/local/repositories/releases/content/") + credentials { + username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("OSSRH_USERNAME") + password = project.findProperty("sonatypePassword") as String? ?: System.getenv("OSSRH_TOKEN") + } + } + } dependencies { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23") @@ -174,6 +183,7 @@ nexusPublishing { snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots/")) username.set(System.getenv("OSSRH_USERNAME")) password.set(System.getenv("OSSRH_TOKEN")) + } } }