From 0555313e439a4fd2fe45ccce068115b4cb72069d Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 2 Sep 2026 13:05:45 -0700 Subject: [PATCH 1/3] chore: Hoxton.SR12 + Central Portal publish (minimal from 0.6.0) - Hoxton.SR1 -> SR12 (Boot 2.2.0 kept, least behavioral change) - distributionManagement bintray/jfrog -> central.sonatype.com (maven-releases/snapshots) - add maven-gpg 3.2.7 + github profile for maven.pkg.github.com - ci.yml v* semver tags, publish to GitHub always + Central when secrets present, GPG via setup-java - keep code as 0.6.0, no driver/websocket breakage --- .github/workflows/ci.yml | 91 +++++++++++++++++++++++++++++++++++++++- .settings.xml | 17 +++----- pom.xml | 47 ++++++++++++++++++--- 3 files changed, 137 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4997037d..d191e704 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: - master tags: - - "*" + - "v*" pull_request: branches: - master @@ -112,3 +112,92 @@ jobs: - name: Run classpath tests run: make PROFILES=${{ matrix.profile }} classpath + + publish: + name: Publish to Maven Central + needs: [test, classpath] + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-24.04 + permissions: + contents: read + packages: write + env: + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + steps: + - name: Checkout repository + uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Set up Java + uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: '11' + cache: maven + server-id: central + server-username: CENTRAL_USERNAME + server-password: CENTRAL_TOKEN + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: GPG_PASSPHRASE + + - name: Verify tag matches pom version + run: | + TAG_VERSION=${GITHUB_REF#refs/tags/v} + POM_VERSION=$(./mvnw help:evaluate -N -Dexpression=project.version -q -DforceStdout | grep -v '\[') + echo "Tag version: $TAG_VERSION" + echo "POM version: $POM_VERSION" + if [[ "$POM_VERSION" != "$TAG_VERSION" ]]; then + echo "::error::Tag $TAG_VERSION does not match pom $POM_VERSION" + echo "::warning::Tag $TAG_VERSION does not match pom $POM_VERSION (expected if release:prepare not used with v prefix))" + exit 1 + fi + + - name: Publish to GitHub Packages + run: ./mvnw --batch-mode -Pgithub -DskipTests deploy + + - name: Publish release to Maven Central + if: ${{ env.CENTRAL_USERNAME != '' }} + env: + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: ./mvnw --batch-mode -Prelease -DskipTests deploy + + snapshot: + name: Publish snapshot + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + runs-on: ubuntu-24.04 + needs: [test, classpath] + permissions: + contents: read + packages: write + env: + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + steps: + - name: Checkout repository + uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Set up Java + uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: '11' + cache: maven + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN + + - name: Publish snapshot to GitHub Packages + run: ./mvnw --batch-mode -Pgithub -DskipTests deploy + + - name: Publish snapshot to Maven Central + if: ${{ env.CENTRAL_USERNAME != '' }} + env: + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }} + run: ./mvnw --batch-mode -DskipTests deploy diff --git a/.settings.xml b/.settings.xml index 85af33a3..2fd8efac 100644 --- a/.settings.xml +++ b/.settings.xml @@ -22,19 +22,14 @@ http://maven.apache.org/xsd/settings-1.0.0.xsd"> - sonatype - ${env.SONATYPE_USER} - ${env.SONATYPE_PASSWORD} + central + ${env.CENTRAL_USERNAME} + ${env.CENTRAL_TOKEN} - bintray - ${env.BINTRAY_USER} - ${env.BINTRAY_KEY} - - - jfrog-snapshots - ${env.BINTRAY_USER} - ${env.BINTRAY_KEY} + github + ${env.GITHUB_ACTOR} + ${env.GITHUB_TOKEN} github.com diff --git a/pom.xml b/pom.xml index 4c6e97c0..171b8ad5 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ 2.2.0.RELEASE - Hoxton.SR1 + Hoxton.SR12 4.3.0 2.2.0 1.3.1 @@ -114,6 +114,7 @@ 10.26.1 0.7.7 0.1.1 + 3.2.7 @@ -331,12 +332,12 @@ - bintray - https://oss.jfrog.org/artifactory/oss-release-local + central + https://central.sonatype.com/repository/maven-releases/ - jfrog-snapshots - https://oss.jfrog.org/artifactory/oss-snapshot-local + central + https://central.sonatype.com/repository/maven-snapshots/ @@ -404,7 +405,7 @@ false release true - @{project.version} + v@{project.version} @@ -499,8 +500,42 @@ + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + github + + + github + https://maven.pkg.github.com/opentracing-contrib/java-spring-cloud + + + github + https://maven.pkg.github.com/opentracing-contrib/java-spring-cloud + + + From 9b79dfd685625b7988be29ca443588b0cc4ab89b Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 2 Sep 2026 14:29:29 -0700 Subject: [PATCH 2/3] fix --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ pom.xml | 19 ++++++++++++++----- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d191e704..bed59700 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,6 +123,7 @@ jobs: packages: write env: CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout repository uses: actions/checkout@v7 @@ -142,6 +143,17 @@ jobs: gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} gpg-passphrase: GPG_PASSPHRASE + - name: Set up Java (GitHub) + uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: '11' + cache: maven + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN + overwrite-settings: false + - name: Verify tag matches pom version run: | TAG_VERSION=${GITHUB_REF#refs/tags/v} @@ -155,6 +167,8 @@ jobs: fi - name: Publish to GitHub Packages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./mvnw --batch-mode -Pgithub -DskipTests deploy - name: Publish release to Maven Central @@ -175,6 +189,7 @@ jobs: packages: write env: CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout repository uses: actions/checkout@v7 @@ -192,7 +207,20 @@ jobs: server-username: GITHUB_ACTOR server-password: GITHUB_TOKEN + - name: Set up Java (Central) + uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: '11' + cache: maven + server-id: central + server-username: CENTRAL_USERNAME + server-password: CENTRAL_TOKEN + overwrite-settings: false + - name: Publish snapshot to GitHub Packages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./mvnw --batch-mode -Pgithub -DskipTests deploy - name: Publish snapshot to Maven Central diff --git a/pom.xml b/pom.xml index 171b8ad5..8256d557 100644 --- a/pom.xml +++ b/pom.xml @@ -114,6 +114,7 @@ 10.26.1 0.7.7 0.1.1 + 0.7.0 3.2.7 @@ -331,10 +332,6 @@ - - central - https://central.sonatype.com/repository/maven-releases/ - central https://central.sonatype.com/repository/maven-snapshots/ @@ -504,7 +501,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.7 + ${version.maven-gpg-plugin} sign-artifacts @@ -521,6 +518,18 @@ + + + org.sonatype.central + central-publishing-maven-plugin + ${version.org.sonatype.central-publishing-maven-plugin} + true + + central + true + published + + From b2c65104b5dee0715fcc19a81a81aadd5f72d09f Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 2 Sep 2026 14:59:14 -0700 Subject: [PATCH 3/3] fix --- .github/workflows/ci.yml | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bed59700..5a3661d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,22 +137,11 @@ jobs: distribution: temurin java-version: '11' cache: maven - server-id: central - server-username: CENTRAL_USERNAME - server-password: CENTRAL_TOKEN + mvn-server-credentials: | + central:CENTRAL_USERNAME:CENTRAL_TOKEN + github:GITHUB_ACTOR:GITHUB_TOKEN gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - gpg-passphrase: GPG_PASSPHRASE - - - name: Set up Java (GitHub) - uses: actions/setup-java@v6 - with: - distribution: temurin - java-version: '11' - cache: maven - server-id: github - server-username: GITHUB_ACTOR - server-password: GITHUB_TOKEN - overwrite-settings: false + gpg-passphrase-env-var: GPG_PASSPHRASE - name: Verify tag matches pom version run: | @@ -203,20 +192,9 @@ jobs: distribution: temurin java-version: '11' cache: maven - server-id: github - server-username: GITHUB_ACTOR - server-password: GITHUB_TOKEN - - - name: Set up Java (Central) - uses: actions/setup-java@v6 - with: - distribution: temurin - java-version: '11' - cache: maven - server-id: central - server-username: CENTRAL_USERNAME - server-password: CENTRAL_TOKEN - overwrite-settings: false + mvn-server-credentials: | + central:CENTRAL_USERNAME:CENTRAL_TOKEN + github:GITHUB_ACTOR:GITHUB_TOKEN - name: Publish snapshot to GitHub Packages env: