Skip to content

Commit

Permalink
Test publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
molekyla committed May 28, 2024
1 parent 42fefd2 commit 5cfa470
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export ORG_GRADLE_PROJECT_ossrhUsername=$OSSRH_USERNAME
export ORG_GRADLE_PROJECT_ossrhPassword=$OSSRH_PASSWORD

RELEASE_TAG=$(git describe --abbrev=0)
./gradlew clean publish closeAndReleaseRepository -PprojVersion=$RELEASE_TAG
./gradlew clean publish closeAndReleaseStagingRepository -PprojVersion=$RELEASE_TAG
25 changes: 13 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ plugins {
id 'maven-publish'
id 'groovy'
id 'groovy-gradle-plugin'
id "com.diffplug.spotless" version "6.13.0"
id 'com.diffplug.spotless' version '6.13.0'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}

repositories {
Expand Down Expand Up @@ -84,17 +85,6 @@ publishing {
}
}
}
repositories {
maven {
def releasesUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
def snapshotsUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
url = version.toString().endsWith("SNAPSHOT") ? snapshotsUrl : releasesUrl
credentials {
username = project.properties["ossrhUsername"].toString()
password = project.properties["ossrhPassword"].toString()
}
}
}
}

signing {
Expand All @@ -103,4 +93,15 @@ signing {
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}

nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/"))
snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots/"))
username.set(project.properties["ossrhUsername"].toString())
password.set(project.properties["ossrhPassword"].toString())
}
}
}

0 comments on commit 5cfa470

Please sign in to comment.