@@ -206,9 +206,9 @@ jobs:
206
206
# The snapshot is downloaded when people build the engine without setting buildNativeProject
207
207
# this is useful for people that want to build only the java part and don't have
208
208
# all the stuff needed to compile natives.
209
- DeploySnapshot :
209
+ DeployNativeSnapshot :
210
210
needs : [BuildJMonkey]
211
- name : " Deploy snapshot"
211
+ name : " Deploy native snapshot"
212
212
runs-on : ubuntu-latest
213
213
if : github.event_name == 'push'
214
214
steps :
@@ -291,6 +291,50 @@ jobs:
291
291
fi
292
292
fi
293
293
294
+ # This job deploys snapshots on the master branch
295
+ DeployJavaSnapshot :
296
+ needs : [BuildJMonkey]
297
+ name : Deploy Java Snapshot
298
+ runs-on : ubuntu-latest
299
+ if : github.event_name == 'push' && github.ref_name == 'master'
300
+ steps :
301
+
302
+ # We need to clone everything again for uploadToMaven.sh ...
303
+ - name : Clone the repo
304
+ uses : actions/checkout@v3
305
+ with :
306
+ fetch-depth : 1
307
+
308
+ # Setup jdk 17 used for building Maven-style artifacts
309
+ - name : Setup the java environment
310
+ uses : actions/setup-java@v3
311
+ with :
312
+ distribution : ' temurin'
313
+ java-version : ' 17'
314
+
315
+ - name : Download natives for android
316
+ uses : actions/download-artifact@master
317
+ with :
318
+ name : android-natives
319
+ path : build/native
320
+
321
+ - name : Rebuild the maven artifacts and deploy them to the Sonatype repository
322
+ run : |
323
+ if [ "${{ secrets.OSSRH_PASSWORD }}" = "" ];
324
+ then
325
+ echo "Configure the following secrets to enable deployment to Sonatype:"
326
+ echo "OSSRH_PASSWORD, OSSRH_USERNAME, SIGNING_KEY, SIGNING_PASSWORD"
327
+ else
328
+ ./gradlew publishMavenPublicationToSNAPSHOTRepository \
329
+ -PossrhPassword=${{ secrets.OSSRH_PASSWORD }} \
330
+ -PossrhUsername=${{ secrets.OSSRH_USERNAME }} \
331
+ -PsigningKey='${{ secrets.SIGNING_KEY }}' \
332
+ -PsigningPassword='${{ secrets.SIGNING_PASSWORD }}' \
333
+ -PuseCommitHashAsVersionName=true \
334
+ --console=plain --stacktrace
335
+ fi
336
+
337
+
294
338
# This job deploys the release
295
339
DeployRelease :
296
340
needs : [BuildJMonkey]
0 commit comments