Skip to content

Commit

Permalink
upgrading io.github.gradle-nexus.publish-plugi too "2.0.0"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Hein committed Apr 16, 2024
1 parent 21d247d commit fccb379
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,21 @@ 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 }}
BUILD_ID: ${{ steps.spell.outputs.version }}

- 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

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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"])
}
Expand Down

0 comments on commit fccb379

Please sign in to comment.