diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ed74cb4..c808bab 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ jobs: - name: Gradle Build run: | - ./gradlew clean build sonar -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_LOGIN -DversionOverride=$BUILD_ID + ./gradlew clean build -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_LOGIN -DversionOverride=$BUILD_ID env: SONAR_HOST: ${{ secrets.SONAR_HOST }} SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c6ca51c..1e011bf 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,7 +28,7 @@ jobs: - name: Gradle Build run: | - ./gradlew clean build sonar -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_LOGIN -DversionOverride=$BUILD_ID + ./gradlew clean build -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_LOGIN -DversionOverride=$BUILD_ID env: SONAR_HOST: ${{ secrets.SONAR_HOST }} SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }} @@ -36,21 +36,13 @@ jobs: - name: Release client to Maven Central run: | - ./gradlew publishToSonatype -DversionOverride=$BUILD_ID + ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -DversionOverride=$BUILD_ID env: ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} BUILD_ID: ${{ steps.spell.outputs.version }} - - name: Close & Release Staging Repository - run: | - ./gradlew closeAndReleaseSonatypeStagingRepository - env: - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} - ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} - - name: Set up QEMU for multiarch builds uses: docker/setup-qemu-action@v2 diff --git a/build.gradle.kts b/build.gradle.kts index a3cab83..56a7abe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ plugins { jacoco id("org.sonarqube") version "3.5.0.2730" - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" + id("io.github.gradle-nexus.publish-plugin") version "2.0.0" } jacoco { diff --git a/client/build.gradle.kts b/client/build.gradle.kts index 8c09d4e..691d921 100644 --- a/client/build.gradle.kts +++ b/client/build.gradle.kts @@ -54,6 +54,7 @@ publishing { from(components["java"]) groupId = "dk.acto" artifactId = "fafnir-client" + version = project.parent?.version as String pom { name.set("Fafnir SSO Client") @@ -98,9 +99,6 @@ publishing { } signing { - requireNotNull(project.version) - val x = project.version as String - require(!x.endsWith("-SNAPSHOT")) useInMemoryPgpKeys(findProperty("signingKey") as String?, "") sign(publishing.publications["mavenJava"]) }