diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 8a9fe05..dd30aa5 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -9,6 +9,7 @@ env: ORG_GRADLE_PROJECT_DEVSOAP_GPG_KEY_BASE64: ${{ secrets.DEVSOAP_GPG_KEY_BASE64 }} ORG_GRADLE_PROJECT_DEVSOAP_GPG_PASSWORD: ${{ secrets.DEVSOAP_GPG_PASSWORD }} ORG_GRADLE_PROJECT_SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }} + ORG_GRADLE_PROJECT_DEVSOAP_DEPLOY_TOKEN: ${{ secrets.DEVSOAP_DEPLOY_TOKEN }} RUNNER_TOOL_CACHE: /toolcache jobs: @@ -38,5 +39,7 @@ jobs: ${{ runner.os }}- - name: Run tests run: ./gradlew --info --stacktrace test + - name: Upload to Devsoap Code + run: ./gradlew publishMavenJavaPublicationToDSCodeRepository - name: Upload to Maven Central run: ./gradlew publishToMavenCentral \ No newline at end of file diff --git a/build.gradle b/build.gradle index b017dd6..cf41314 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,7 @@ java { repositories { mavenCentral() + maven { url "https://code.devsoap.com/api/packages/john/maven" } } dependencies { diff --git a/publish.gradle b/publish.gradle index bf39118..4b4f60e 100644 --- a/publish.gradle +++ b/publish.gradle @@ -32,6 +32,7 @@ buildscript { ext { hasSignatureKey = findProperty("DEVSOAP_GPG_KEY_BASE64") != null sonatypeToken = findProperty("SONATYPE_TOKEN") as String + devsoapToken = findProperty("DEVSOAP_DEPLOY_TOKEN") as String signingKeyBase64 = (findProperty("DEVSOAP_GPG_KEY_BASE64") as String)?.getBytes(StandardCharsets.UTF_8) signingKey = hasSignatureKey ? new String(Base64.decoder.decode(signingKeyBase64)) : "" signingPassword = hasSignatureKey ? findProperty("DEVSOAP_GPG_PASSWORD") : "" @@ -44,6 +45,19 @@ signing { } publishing { + repositories { + maven { + name = "DSCode" + url = uri("https://code.devsoap.com/api/packages/john/maven") + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "token ${devsoapToken}" + } + authentication { + header(HttpHeaderAuthentication) + } + } + } publications { mavenJava(MavenPublication) { from components.java