From 9eebd3f9b759b2e34ec12ba14da82d417c5ceb2c Mon Sep 17 00:00:00 2001 From: Hector Geraldino Date: Fri, 7 Aug 2026 14:38:03 -0400 Subject: [PATCH] Publish only bmq-sdk to Maven Central; add publish dry-run Exclude the aggregator POM (bmq-sdk-java) and the examples module (bmq-examples) from the Central bundle via the central-publishing plugin's excludeArtifacts, so only the bmq-sdk library is released. Drop the maven.deploy.skip settings, which central-publishing ignores. Add a dry_run toggle to the publish workflow: when enabled it passes -Dcentral.skipPublishing=true so the signed bundle is built and uploaded as a CI artifact WITHOUT publishing to Central, letting the bundle contents be verified before a real release. Bump version to 0.0.18. Signed-off-by: Hector Geraldino --- .github/workflows/publish.yaml | 24 ++++++++++++++++++++++-- bmq-examples/pom.xml | 14 +------------- bmq-sdk/pom.xml | 2 +- pom.xml | 17 ++++++++++++----- 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 993b6fa..a00b88a 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,6 +1,12 @@ name: 'Publish to Maven Central' -on: workflow_dispatch +on: + workflow_dispatch: + inputs: + dry_run: + description: 'Build & upload the bundle as a CI artifact WITHOUT publishing to Maven Central' + type: boolean + default: false jobs: publish: @@ -23,8 +29,22 @@ jobs: gpg-passphrase: GPG_KEY_PASSPHRASE - name: 'Publish to Maven Central' - run: mvn --batch-mode -Possrh -Dmaven.test.skip=true -Dspotbugs.skip=true -Dgpg.keyname=${{ secrets.GPG_KEY_ID }} -Dgpg.passphrase=${{ secrets.GPG_KEY_PASSPHRASE }} deploy + run: mvn --batch-mode -Possrh -Dcentral.skipPublishing=${{ inputs.dry_run }} -Dmaven.test.skip=true -Dspotbugs.skip=true -Dgpg.keyname=${{ secrets.GPG_KEY_ID }} -Dgpg.passphrase=${{ secrets.GPG_KEY_PASSPHRASE }} deploy env: GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + + # Dry run only: surface what WOULD be published so the bundle can be verified + # (e.g. that bmq-examples and the aggregator POM are excluded) before a real release. + - name: 'Inspect bundle (dry run)' + if: ${{ inputs.dry_run }} + run: find . -name central-bundle.zip -exec unzip -l {} \; + + - name: 'Upload bundle (dry run)' + if: ${{ inputs.dry_run }} + uses: actions/upload-artifact@v4 + with: + name: central-bundle + path: '**/central-bundle.zip' + if-no-files-found: error diff --git a/bmq-examples/pom.xml b/bmq-examples/pom.xml index c1c3a17..724439c 100644 --- a/bmq-examples/pom.xml +++ b/bmq-examples/pom.xml @@ -18,7 +18,7 @@ limitations under the License. --> com.bloomberg.bmq bmq-sdk-java - 0.0.17 + 0.0.18 com.bloomberg.bmq @@ -121,16 +121,4 @@ limitations under the License. --> - - - - - ossrh - - true - - - diff --git a/bmq-sdk/pom.xml b/bmq-sdk/pom.xml index fa754e4..80be355 100644 --- a/bmq-sdk/pom.xml +++ b/bmq-sdk/pom.xml @@ -18,7 +18,7 @@ limitations under the License. --> com.bloomberg.bmq bmq-sdk-java - 0.0.17 + 0.0.18 bmq-sdk diff --git a/pom.xml b/pom.xml index f4a9538..21afb9a 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ limitations under the License. --> com.bloomberg.bmq bmq-sdk-java - 0.0.17 + 0.0.18 pom BlazingMQ Java SDK Bundle @@ -568,10 +568,10 @@ limitations under the License. --> ossrh - - false + + false @@ -639,6 +639,13 @@ limitations under the License. --> central true published + ${central.skipPublishing} + + + bmq-sdk-java + bmq-examples +