Skip to content

Commit

Permalink
(chore) publish snapshots to OSSRH
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-pelykh committed Jun 20, 2024
1 parent 9e1189c commit a2225e1
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ jobs:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository -Ppcre4j.version=${{ github.ref_name }}-SNAPSHOT
run: ./gradlew publish -Ppcre4j.version=${{ github.ref_name }}-SNAPSHOT
11 changes: 9 additions & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ plugins {
jacoco
}

version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"

repositories {
mavenCentral()
}
Expand Down Expand Up @@ -77,7 +79,7 @@ publishing {

groupId = "org.pcre4j"
artifactId = project.name
version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"
version = project.version.toString()

pom {
name = "org.pcre4j:${project.name}"
Expand Down Expand Up @@ -120,7 +122,12 @@ publishing {

maven {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
url = uri(
if (project.version.toString().endsWith("-SNAPSHOT"))
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
else
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_TOKEN")
Expand Down
11 changes: 9 additions & 2 deletions ffm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ plugins {
jacoco
}

version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"

repositories {
mavenCentral()
}
Expand Down Expand Up @@ -98,7 +100,7 @@ publishing {

groupId = "org.pcre4j"
artifactId = project.name
version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"
version = project.version.toString()

pom {
name = "org.pcre4j:${project.name}"
Expand Down Expand Up @@ -141,7 +143,12 @@ publishing {

maven {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
url = uri(
if (project.version.toString().endsWith("-SNAPSHOT"))
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
else
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_TOKEN")
Expand Down
11 changes: 9 additions & 2 deletions jna/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ plugins {
jacoco
}

version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"

repositories {
mavenCentral()
}
Expand Down Expand Up @@ -81,7 +83,7 @@ publishing {

groupId = "org.pcre4j"
artifactId = project.name
version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"
version = project.version.toString()

pom {
name = "org.pcre4j:${project.name}"
Expand Down Expand Up @@ -124,7 +126,12 @@ publishing {

maven {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
url = uri(
if (project.version.toString().endsWith("-SNAPSHOT"))
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
else
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_TOKEN")
Expand Down
11 changes: 9 additions & 2 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ plugins {
jacoco
}

version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"

repositories {
mavenCentral()
}
Expand Down Expand Up @@ -78,7 +80,7 @@ publishing {

groupId = "org.pcre4j"
artifactId = project.name
version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"
version = project.version.toString()

pom {
name = "org.pcre4j:${project.name}"
Expand Down Expand Up @@ -121,7 +123,12 @@ publishing {

maven {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
url = uri(
if (project.version.toString().endsWith("-SNAPSHOT"))
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
else
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_TOKEN")
Expand Down
11 changes: 9 additions & 2 deletions regex/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ plugins {
jacoco
}

version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"

repositories {
mavenCentral()
}
Expand Down Expand Up @@ -80,7 +82,7 @@ publishing {

groupId = "org.pcre4j"
artifactId = project.name
version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"
version = project.version.toString()

pom {
name = "org.pcre4j:${project.name}"
Expand Down Expand Up @@ -123,7 +125,12 @@ publishing {

maven {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
url = uri(
if (project.version.toString().endsWith("-SNAPSHOT"))
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
else
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_TOKEN")
Expand Down
2 changes: 2 additions & 0 deletions test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ plugins {
jacoco
}

version = findProperty("pcre4j.version") as String? ?: "0.0.0-SNAPSHOT"

repositories {
mavenCentral()
}
Expand Down

0 comments on commit a2225e1

Please sign in to comment.