Skip to content

Commit

Permalink
main.yml: deploy the artifacts from each release to Sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Mar 13, 2021
1 parent 2272bce commit db06d14
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# - Build natives for android
# - Merge the natives, build the engine, create the zip release, maven artifacts, javadoc and native snapshot
# - (only when native code changes) Deploy the natives snapshot to the MinIO instance
# - (only when building a release) Deploy everything else to github releases, github packet registry and bintray
# - (only when building a release) Deploy everything else to github releases, github packet registry, Bintray, and Sonatype
# - (only when building a release) Update javadoc.jmonkeyengine.org
# Note:
# All the actions/upload-artifact and actions/download-artifact steps are used to pass
Expand All @@ -22,6 +22,9 @@
# BINTRAY_LICENSE="BSD 3-Clause"
# >> Configure MINIO NATIVES SNAPSHOT
# OBJECTS_KEY=XXXXXX
# >> Configure SONATYPE RELEASE
# OSSRH_PASSWORD=XXXXXX
# OSSRH_USERNAME=XXXXXX
# >> Configure SIGNING
# SIGNING_KEY=XXXXXX
# SIGNING_PASSWORD=XXXXXX
Expand Down Expand Up @@ -319,9 +322,23 @@ jobs:
uses: actions/download-artifact@master
with:
name: release
path: dist/release

- name: Deploy to github releases
path: dist/release

- name: Deploy the maven artifacts to Sonatype OSSRH
run: |
if [ "${{ secrets.OSSRH_PASSWORD }}" = "" ];
then
echo "Configure the following secrets to enable deployment to Sonatype:"
echo "OSSRH_PASSWORD, OSSRH_USERNAME"
else
./gradlew publishMavenPublicationToOSSRHRepository \
-PossrhPassword=${{ secrets.OSSRH_PASSWORD }} \
-PossrhUsername=${{ secrets.OSSRH_USERNAME }} \
-PskipPrebuildLibraries=true -PuseCommitHashAsVersionName=true \
--console=plain --stacktrace
fi
- name: Deploy to GitHub Releases
run: |
# We need to get the release id (yeah, it's not the same as the tag)
echo "${GITHUB_EVENT_PATH}"
Expand Down

0 comments on commit db06d14

Please sign in to comment.