jMonkeyEngine / jmonkeyengine

A complete 3-D game development suite written in Java.
http://jmonkeyengine.org
BSD 3-Clause "New" or "Revised" License
3.84k stars 1.13k forks source link

main.yml: OSSRH artifacts are build with different java version #1923

Closed Ali-RS closed 1 year ago

Ali-RS commented 1 year ago

I noticed DeployRelease job that publishes Maven Publication to OSSRH repository has no setup-java action to install the intended java version on the OS and probably the latest ubuntu comes with java 11 by default or could be that running the ./gradlew publishMavenPublicationToOSSRHRepository installs java 11 by default(?) so artifacts are built with java 11.

https://github.com/jMonkeyEngine/jmonkeyengine/blob/458e9ec210c131f92f4d8e5f93f01f1dc93b0a5b/.github/workflows/main.yml#L293-L341

The JME 3.6.0-alpha3 artifacts published on the Maven Central Repo have Created-By: 11 (Eclipse Adoptium) in their MANIFEST.MF.

Ali-RS commented 1 year ago

Submitted a fix in #1924

pavly-gerges commented 1 year ago

The deploy task doesn't call ./gradlew build, it downloads the pre-built artifacts and publishes them.

pavly-gerges commented 1 year ago

Btw, this issue has a wrong flag.

Ali-RS commented 1 year ago

The deploy task doesn't call ./gradlew build, it downloads the pre-built artifacts and publishes them.

I do not know where the publishMavenPublicationToOSSRHRepository task comes from (probably from maven-publish plugin?) but by looking at the logs on the GitHub action it also calls the compileJava task: https://github.com/jMonkeyEngine/jmonkeyengine/actions/runs/3922595564/jobs/6705722231#step:6:135

Btw, this issue has a wrong flag.

Fixed it, thanks!

Ali-RS commented 1 year ago

Also, here it says that it will rebuild the artifacts

https://github.com/jMonkeyEngine/jmonkeyengine/blob/458e9ec210c131f92f4d8e5f93f01f1dc93b0a5b/.github/workflows/main.yml#L326