new process for publishing snapshots and releases to Sonatype#2535
new process for publishing snapshots and releases to Sonatype#2535stephengold merged 3 commits intomasterfrom
Conversation
|
JME snapshot builds are again available for the "master" branch. For future reference, the URL of the Central Portal Snapshots repo is https://central.sonatype.com/repository/maven-snapshots/ . Unlike Maven Central, that repo doesn't appear to be browsable via HTTP or HTTPS. However, I successfully built one of my JME-dependent projects using that URL and the "3.9.0-SNAPSHOT" version ID. |
|
I just noticed a mistake: "uploadToCentral.sh" should've been added to the ".github/actions/tools" directory, not at the root of the project. |
|
My first attempt to release v3.9.0-alpha3 failed in the "Deploy Release" job with: > Task :getNativesZipFile FAILED
Download natives from https://objects.jmonkeyengine.org/native-snapshots/89000af21c0dabaad04815086c9b42e543e3a4dd/jme3-natives.zip to /home/runner/work/jmonkeyengine/jmonkeyengine/build/89000af21c0dabaad04815086c9b42e543e3a4dd-natives.zip
15 actionable tasks: 15 executed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':getNativesZipFile'.
> Can't get https://objects.jmonkeyengine.org/native-snapshots/89000af21c0dabaad04815086c9b42e543e3a4dd/jme3-natives.zip to /home/runner/work/jmonkeyengine/jmonkeyengine/build/89000af21c0dabaad04815086c9b42e543e3a4dd-natives.zip |
|
When I try to access that object.jmonkeyengine.org URL via my web browser, I get a "502 Bad Gateway". @riccardobl please troubleshoot the MinIO instance. |
|
After Riccardo solved the MinIO issue, I re-ran the failed job via the GitHub web interface, and it succeeded. |
The Engine's current processes for deploying snapshot builds and publishing releases to Maven Central are broken.
That's because they rely on Sonatype's Open-Source Software Repository Hosting (OSSRH) service, which sunsetted on June 30, 2025.
This PR attempts to migrate these processes to Sonatype's new Central Publisher APIs.
The new process for deploying snapshot builds attempts to follow the current instructions at https://central.sonatype.org/publish/publish-portal-snapshots . I've added the new credentials to the GitHub repo's action secrets. I've also enabled snapshots for the "org.jmonkeyengine" namespace. However, I haven't tested the new process yet.
The new process for publishing releases to Maven Central uses the Portal OSSRH Staging API described at https://central.sonatype.org/publish/publish-portal-ossrh-staging-api . Note there are 3 upload steps. First the deployment files are uploaded (using Gradle) to Sonatype's new OSSRH staging area. Then they are uploaded from the staging area (using a new bash script) to Sonatype's Central Publisher Portal. The final upload is a manual step (performed at Sonatype's Central Publisher website) that publishes the CPP deployment to Maven Central. While this process is closely based on my personal process for publishing releases in the "com.github.stephengold" namespace, I haven't tested it on the "org.jmonkeyengine" namespace yet.
Note: since I uploaded my personal credentials to the GitHub repo's action secrets, the new processes will fail if I ever regenerate my Sonatype user token. Once the new processes are tested, the release manager should update those secrets to their own credentials.