Canonical repository: coinbase/prime-sdk-java.
This project publishes through the Sonatype Central Portal (central-publishing-maven-plugin with server id central).
- JDK 11+
- Maven 3.8+
- GPG key configured (
gpg.keynamein Maven settings orpom.xmlproperties) - Sonatype Central user token (generate in the portal; use server id
centralin~/.m2/settings.xml)
Creating a GitHub Release runs .github/workflows/publish.yml. You can also run the workflow manually from Actions → publish → Run workflow, providing the release tag (for example v1.9.0).
The workflow checks out the release tag, aligns pom.xml version with the tag (for example v1.9.0 → 1.9.0), runs Spotless and tests, then runs mvn clean deploy.
Use the GitHub CLI (gh auth login if needed). From a clone of this repo:
gh workflow run publish -f tag=v1.9.0From another directory, pass the repository explicitly:
gh workflow run publish --repo coinbase/prime-sdk-java -f tag=v1.9.0Watch the latest run or list recent publish runs:
gh run watch
gh run list --workflow=publishConfigure these under Settings → Environments → release → Environment secrets (the publish job uses the release environment):
| Secret | Description |
|---|---|
MAVEN_CENTRAL_USERNAME |
Sonatype Central token username |
MAVEN_CENTRAL_TOKEN |
Sonatype Central token password |
MAVEN_GPG_PRIVATE_KEY |
ASCII-armored GPG secret key (gpg --armor --export-secret-keys KEY_ID) |
MAVEN_GPG_PASSPHRASE |
Passphrase for that key |
MAVEN_GPG_KEY_ID |
GPG key id used by maven-gpg-plugin (gpg.keyname) |
- Bump
<version>onmain(or rely on the workflow to set it from the tag). - Create and push an annotated tag:
git tag v1.9.0 && git push origin v1.9.0 - Create a GitHub Release for that tag (event type created triggers publish).
- Confirm the workflow succeeded and the artifact appears on Maven Central.