Skip to content

Commit

Permalink
Add back nexus publish
Browse files Browse the repository at this point in the history
Signed-off-by: Jendrik Johannes <[email protected]>
  • Loading branch information
jjohannes committed Feb 20, 2024
1 parent 1b07f55 commit c32db9d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,7 @@ jobs:
run: ./gradlew assemble :sdk:javadoc --scan

- name: Nexus Release
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-parallel --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew closeAndReleaseSonatypeStagingRepository --no-configuration-cache --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}

- name: Nexus Release (sdk-full)
run: ./gradlew -Pfull=true closeAndReleaseSonatypeStagingRepository --no-configuration-cache --scan -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
1 change: 1 addition & 0 deletions gradle/plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies {
implementation("com.autonomousapps:dependency-analysis-gradle-plugin:1.30.0")
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.7")
implementation("com.google.protobuf:protobuf-gradle-plugin:0.9.4")
implementation("io.github.gradle-nexus:publish-plugin:1.3.0")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0")
implementation("org.gradlex:extra-java-module-info:1.8")
implementation("org.gradlex:java-ecosystem-capabilities:1.5.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
plugins {
id("com.hedera.gradlebuild.repositories")
id("com.autonomousapps.dependency-analysis")
// TODO id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
id("io.github.gradle-nexus.publish-plugin")
}

val productVersion = layout.projectDirectory.file("version.txt").asFile.readText().trim()
Expand All @@ -29,3 +29,15 @@ tasks.register("showVersion") {

doLast { println(inputs.properties["version"]) }
}

nexusPublishing {
repositories {
sonatype { }
}
}

tasks.named("closeSonatypeStagingRepository") {
// The publishing of all components to Maven Central (in this case only 'sdk') is
// automatically done before close (which is done before release).
dependsOn(":sdk:publishToSonatype")
}

0 comments on commit c32db9d

Please sign in to comment.