|
| 1 | +# Releasing JMemoryBuddy |
| 2 | + |
| 3 | +The version is derived from the latest reachable git tag (`X.Y.Z`, no prefix): |
| 4 | + |
| 5 | +- HEAD exactly on tag `X.Y.Z`, clean tree → version `X.Y.Z` |
| 6 | +- commits after the tag, or a dirty tree → version `X.Y.(Z+1)-SNAPSHOT` |
| 7 | +- no tag → `0.5.7-SNAPSHOT` (fallback) |
| 8 | + |
| 9 | +The derived version is printed at the start of every build. |
| 10 | + |
| 11 | +## Releasing a version |
| 12 | + |
| 13 | +```bash |
| 14 | +./tagRelease.sh jmemorybuddy X.Y.Z |
| 15 | +``` |
| 16 | + |
| 17 | +The first argument is the project name, guarding against running this in the wrong repo. |
| 18 | +The script only tags: it verifies a clean tree on an up-to-date `master` and a dated |
| 19 | +`### X.Y.Z` CHANGELOG entry, then tags and pushes `X.Y.Z`. The tag push triggers |
| 20 | +`.github/workflows/release.yml`, which builds and publishes via the scripts: |
| 21 | + |
| 22 | +| Script | Registry | Versions | |
| 23 | +|---|---|---| |
| 24 | +| `publishSandecArtifactory.sh` | Sandec Artifactory | snapshots (every `master` push, via CI) and releases | |
| 25 | +| `publishMavenCentral.sh` | Maven Central (Sonatype Central Portal) | releases only (refuses snapshots) | |
| 26 | + |
| 27 | +Maven Central publishing is `AUTOMATIC` (see `build.gradle`): the tag-triggered deployment |
| 28 | +is uploaded and released to Maven Central without a manual portal step — the tag is the gate, |
| 29 | +so don't tag until the CHANGELOG and version are right (releases can't be unpublished). There |
| 30 | +is no version bump and no bump-back — after the release, builds become `X.Y.(Z+1)-SNAPSHOT`. |
| 31 | + |
| 32 | +## Required repository secrets |
| 33 | + |
| 34 | +- `SANDEC_ARTIFACTORY_USERNAME` / `SANDEC_ARTIFACTORY_PASSWORD` |
| 35 | +- `SANDEC_SIGNING_KEY_ID` / `SANDEC_SIGNING_SECRET_KEY` / `SANDEC_SIGNING_PASSWORD` — GPG |
| 36 | +- `SANDEC_SONATYPE_AUTH_TOKEN` — Sonatype Central Portal token |
| 37 | + |
| 38 | +## Note on the first tag-derived release |
| 39 | + |
| 40 | +The latest existing tag is `0.5.5`, while `0.5.6` was published manually (untagged) — so until |
| 41 | +a new tag exists, builds derive `0.5.6-SNAPSHOT`. The next release should be `0.5.7` |
| 42 | +(`./tagRelease.sh jmemorybuddy 0.5.7`), which realigns the tags with the published versions. |
0 commit comments