Skip to content

feat: Maven Central publishing pipeline#16

Merged
MarketDataDev03 merged 3 commits into
mainfrom
16_gh_action_release_publish
Jun 29, 2026
Merged

feat: Maven Central publishing pipeline#16
MarketDataDev03 merged 3 commits into
mainfrom
16_gh_action_release_publish

Conversation

@MarketDataDev03

Copy link
Copy Markdown
Collaborator

feat: Maven Central publishing pipeline

Branch 15_improve_examplesmain · 1 commit · 4 files

Wires the SDK for publication to Maven Central via the Sonatype Central Portal, plus a dedicated, manually-triggered GitHub Actions workflow to run the release. The publishing path was validated end-to-end with a manual validate-and-drop deployment before this PR (the bundle passed signing, POM, and namespace validation on the Portal).

What's included

  • groupId → app.marketdata. Switched the Maven coordinate from the unverified com.marketdata to app.marketdata, the namespace verified under the Central Portal account (domain marketdata.app, reversed). The Java package (com.marketdata.sdk) and the artifactId (marketdata-sdk-java) are unchanged — only the published coordinate moves. README and the consumer-test example are updated to match.
  • Vanniktech publishing config (build.gradle.kts):
    • publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = false) — targets the Portal explicitly (the no-arg default routes to legacy OSSRH, which rejects Portal accounts) and stops at VALIDATED for manual review/release rather than auto-publishing.
    • signAllPublications() — GPG signing, required by Central. Credentials read from Gradle properties / env vars; never hard-coded.
    • Complete POM metadata (url, licenses, developers, scm, inceptionYear) — the fields Central rejects if missing, previously TODO placeholders.
    • Version is overridable via -PsdkVersion=… (default stays 0.1.0-SNAPSHOT) so a release version is supplied at publish time without committing it.
  • Release workflow (.github/workflows/publish.yml): standalone, manual workflow_dispatch with two inputs — version and a release toggle. Off uploads to the Portal and stops at VALIDATED for manual review; on runs publishAndReleaseToMavenCentral. Builds and tests on JDK 17 before publishing, and runs under the maven-central GitHub Environment for optional approval gating.

Required repository secrets

The workflow expects four Actions secrets:

Secret Value
MAVEN_CENTRAL_USERNAME Central Portal token username
MAVEN_CENTRAL_PASSWORD Central Portal token password
SIGNING_KEY armored GPG private key (gpg --armor --export-secret-keys KEYID)
SIGNING_KEY_PASSWORD GPG passphrase

How to release

GitHub → Actions → "Publish to Maven Central" → Run workflow:

  • version: e.g. 0.1.0
  • release: off to upload and stop at VALIDATED (review and drop in the Portal), on to publish and release.

workflow_dispatch only appears in the Actions UI once publish.yml is on the default branch, so the manual trigger becomes available after this PR merges to main.

Notes

  • No source or runtime behavior changes — packaging and CI only.
  • Consumers that resolve the examples against mavenLocal must re-run make publish to repopulate under the new app.marketdata coordinate.

@MarketDataDev03 MarketDataDev03 self-assigned this Jun 25, 2026
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

The author of this PR, MarketDataDev03, is not an activated member of this organization on Codecov.
Please activate this user on Codecov to display this PR comment.
Coverage data is still being uploaded to Codecov.io for purposes of overall coverage calculations.
Please don't hesitate to email us at support@codecov.io with any questions.

@MarketDataDev03 MarketDataDev03 marked this pull request as ready for review June 25, 2026 14:34
Base automatically changed from 15_improve_examples to main June 26, 2026 21:49
@MarketDataDev03 MarketDataDev03 merged commit 247829e into main Jun 29, 2026
5 checks passed
@MarketDataDev03 MarketDataDev03 deleted the 16_gh_action_release_publish branch June 29, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants