End-to-end instructions for publishing rs.adsdev:ifconfig-java to
Maven Central via the Central Portal.
The runtime flow is push a v* git tag; everything else is one-time
setup.
Central Portal needs proof you control adsdev.rs.
-
Sign in to central.sonatype.com with GitHub or Google.
-
View Namespaces → Add Namespace → enter
rs.adsdev. -
Central shows a TXT record value (random string). Add it to the
adsdev.rszone:Type: TXT Host: @ Value: <token from Central> TTL: 300 -
Wait for DNS propagation (usually < 5 min) and hit Verify in the portal. Once green, the namespace is permanently yours and no further verification is needed for future artifacts under
rs.adsdev.*.
Maven Central rejects unsigned artifacts. Don't reuse a personal key — make a dedicated one with no expiry traps:
gpg --quick-generate-key "ADSDEV Release <release@adsdev.rs>" rsa4096 sign 2yYou'll be asked for a passphrase — pick a strong one, save it in a password manager. Then publish the public half so Central can verify signatures:
KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | awk '/^sec/ {split($2,a,"/"); print a[2]; exit}')
# Upload to the keyserver Central trusts:
gpg --keyserver keys.openpgp.org --send-keys "$KEY_ID"
gpg --keyserver keyserver.ubuntu.com --send-keys "$KEY_ID"Export the private key for GitHub Actions (this is the secret you'll paste into the workflow):
gpg --armor --export-secret-keys "$KEY_ID" > release-key.asc
# paste the contents into the GPG_PRIVATE_KEY GitHub secret, then:
shred -u release-key.ascIn the portal: profile menu → View Account → Generate User Token. You get a username and password pair (these are not your login password — they're token credentials). Save both.
In https://github.com/adsdevdoo/ifconfig-java/settings/secrets/actions
add four secrets:
| Name | Value |
|---|---|
CENTRAL_USERNAME |
Token username from step 3 |
CENTRAL_PASSWORD |
Token password from step 3 |
GPG_PRIVATE_KEY |
Full content of release-key.asc (including BEGIN/END lines) |
GPG_PASSPHRASE |
The passphrase you set in step 2 |
-
Update
<version>inpom.xmlto a clean semver (1.0.1,1.1.0,2.0.0— no-SNAPSHOT). -
Commit and push to
master. -
Tag and push:
git tag v1.0.1 git push origin v1.0.1
-
The
Releaseworkflow on GitHub Actions runs automatically. It:- checks the tag matches
pom.xml, - builds + tests,
- generates sources + javadoc jars,
- signs everything with the release GPG key,
- uploads to Central Portal and waits until Central has validated
the bundle — fails the job if validation is rejected. With
autoPublish=trueCentral then publishes it automatically in the background; the job intentionally does not block on full propagation (polling untilpublishedused to fail the job on transient 502s from Central's status API).
- checks the tag matches
-
New version appears under
rs.adsdev:ifconfig-javaon search.maven.org within ~15 min.
If the workflow fails after upload, the staged bundle is visible in Central Portal's Deployments tab — fix the issue, drop the broken bundle, bump the version (Central won't accept a re-upload at the same coordinates), and tag again.
Maven Central is immutable: once 1.0.1 is published it cannot be
overwritten. After a release, bump pom.xml to the next -SNAPSHOT
(e.g. 1.0.2-SNAPSHOT) on master so day-to-day development doesn't
collide with the released coordinates.