Skip to content

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

@Ali-RS

Description

@Ali-RS

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.

# This job deploys the release
DeployRelease:
needs: [BuildJMonkey]
name: Deploy Release
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
# We need to clone everything again for uploadToMaven.sh ...
- name: Clone the repo
uses: actions/checkout@v3
with:
fetch-depth: 1
# Download all the stuff...
- name: Download maven artifacts
uses: actions/download-artifact@master
with:
name: maven
path: dist/maven
- name: Download release
uses: actions/download-artifact@master
with:
name: release
path: dist/release
- name: Download natives for android
uses: actions/download-artifact@master
with:
name: android-natives
path: build/native
- name: Rebuild the maven artifacts and deploy them to Sonatype OSSRH
run: |
if [ "${{ secrets.OSSRH_PASSWORD }}" = "" ];
then
echo "Configure the following secrets to enable deployment to Sonatype:"
echo "OSSRH_PASSWORD, OSSRH_USERNAME, SIGNING_KEY, SIGNING_PASSWORD"
else
./gradlew publishMavenPublicationToOSSRHRepository \
-PossrhPassword=${{ secrets.OSSRH_PASSWORD }} \
-PossrhUsername=${{ secrets.OSSRH_USERNAME }} \
-PsigningKey='${{ secrets.SIGNING_KEY }}' \
-PsigningPassword='${{ secrets.SIGNING_PASSWORD }}' \
-PuseCommitHashAsVersionName=true \
--console=plain --stacktrace
fi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildscriptAn issue with the buildscript

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions