Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 2.24 KB

File metadata and controls

69 lines (47 loc) · 2.24 KB

Releasing JavaSake

JavaSake is published to Maven Central (via the Sonatype Central Portal) so downstream projects can depend on it directly:

dependencies {
    implementation("org.openminimed:javasake:<version>")
}

Publishing is automated: pushing a vX.Y.Z tag builds, signs, and publishes the release, then creates a GitHub Release (.github/workflows/release.yml). Local builds and PRs always use a -SNAPSHOT version and never publish.

One-time setup (repo admin)

Publishing requires four repository secrets. None are needed to build or test; they are read only by the release workflow.

1. Maven Central namespace

The published coordinate uses the org.openminimed group, so the Central Portal namespace org.openminimed must be verified once. Two options:

  • org.openminimed (current group) — requires verifying ownership of the openminimed.org domain via a DNS TXT record in the Central Portal. Preferred if the org owns that domain.
  • io.github.openminimed — verified automatically against the GitHub org, no domain needed. If you prefer this, change group in lib/build.gradle.kts accordingly before the first release.

2. Central Portal user token

In the Central Portal (https://central.sonatype.com) → AccountGenerate User Token. Store the two halves as:

  • MAVEN_CENTRAL_USERNAME
  • MAVEN_CENTRAL_PASSWORD

3. GPG signing key

Central requires signed artifacts. Generate a key, publish its public half to a keyserver, then export the private key in-memory (ASCII-armored):

gpg --armor --export-secret-keys <KEY_ID>

Store as:

  • SIGNING_KEY — the full ASCII-armored private key block
  • SIGNING_KEY_PASSWORD — its passphrase

Add all four under Settings → Secrets and variables → Actions.

Cutting a release

  1. Decide the version (SemVer, e.g. 0.2.0).

  2. Tag and push:

    git tag v0.2.0
    git push origin v0.2.0
  3. The release workflow publishes to Central (auto-released once validation passes) and opens a GitHub Release. The artifact typically appears on Central within ~15-30 minutes.

Do not set the version in lib/build.gradle.kts; it is derived from the tag (-PreleaseVersion), so the tag is the single source of truth.