Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
include:
- platform: ubuntu-latest
systemIdentifier: 'linux-x64'
- platform: depot-ubuntu-24.04-arm
- platform: ubuntu-24.04-arm
systemIdentifier: 'linux-arm64'
- platform: macos-13 # last macOS version with x86_64 support
systemIdentifier: 'darwin-x64'
- platform: depot-macos-latest
- platform: macos-latest
systemIdentifier: 'darwin-arm64'
runs-on: ${{ matrix.platform }}
steps:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ jobs:
- name: Build multiplatform jar
run: |
cd jpostal
./gradlew publish
./gradlew publish --info
./gradlew jreleaserDeploy --info
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GH_PKG_WRITE_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.MAVEN_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
# For releases
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_USERNAME }}
JRELEASER_MAVENCENTRAL_PASSWORD,: ${{ secrets.MAVEN_PASSWORD }}
# For snapshots
JRELEASER_NEXUS2_USERNAME: ${{ secrets.MAVEN_USERNAME }}
JRELEASER_NEXUS2_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
52 changes: 37 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ plugins {
id 'java'
id 'application'
id 'maven-publish'
id 'org.jreleaser' version '1.19.0'
}

// The latest libpostal release is 1.1.0, but there are many unreleased changes in the master branch
version = '1.2.1'
group = 'com.wherobots'
version = '1.2.1-SNAPSHOT'

repositories {
mavenCentral()
Expand Down Expand Up @@ -111,7 +112,6 @@ jar {
}



java {
withJavadocJar()
withSourcesJar()
Expand All @@ -122,12 +122,10 @@ sourcesJar.duplicatesStrategy DuplicatesStrategy.EXCLUDE
// Configure publishing
publishing {
publications {
mavenJava(MavenPublication) {
from components.java

groupId = 'com.wherobots'
maven(MavenPublication) {
artifactId = 'jpostal'
version = project.version

from components.java

pom {
name = 'jpostal'
Expand All @@ -146,7 +144,7 @@ publishing {
developer {
id = 'james-willis'
name = 'James Willis'
email = 'james@herobots.com'
email = 'james@wherobots.com'
}
}

Expand All @@ -161,12 +159,36 @@ publishing {

repositories {
maven {
name = "WherobotsGithubPackages"
url = "https://maven.pkg.github.com/wherobots/packages"
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME") || ""
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
url = layout.buildDirectory.dir('staging-deploy')
}
}
}

jreleaser {
signing {
active = 'ALWAYS'
armored = true
}
deploy {
maven {
mavenCentral {
'release-deploy' {
active = 'RELEASE'
url = 'https://central.sonatype.com/api/v1/publisher'
stagingRepository('build/staging-deploy')
}
}
nexus2 {
'snapshot-deploy' {
active = 'SNAPSHOT'
snapshotUrl = 'https://central.sonatype.com/repository/maven-snapshots/'
applyMavenCentralRules = true
snapshotSupported = true
closeRepository = true
releaseRepository = true
stagingRepository('build/staging-deploy')
}
}
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading
Loading