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 +