Skip to content

Commit

Permalink
Add logic to upload the Godot Android library to MavenCentral
Browse files Browse the repository at this point in the history
Add environment variable to sign the release build for the Godot Android Editor
  • Loading branch information
m4gr3d committed Mar 7, 2023
1 parent 72cb40f commit 31163f8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
7 changes: 6 additions & 1 deletion build-android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ if [ "${CLASSICAL}" == "1" ]; then
popd

mkdir -p /root/out/tools
cp bin/android_editor.apk /root/out/tools/
# Note: this will fail if the apk is not signed.
cp bin/android_editor_builds/android_editor-release.apk /root/out/tools/

$SCONS platform=android arch=arm32 $OPTIONS target=template_debug
$SCONS platform=android arch=arm32 $OPTIONS target=template_release
Expand All @@ -47,6 +48,10 @@ if [ "${CLASSICAL}" == "1" ]; then

pushd platform/android/java
./gradlew generateGodotTemplates

# Push Godot Android library to MavenCentral
./gradlew publishTemplateReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository

popd

mkdir -p /root/out/templates
Expand Down
2 changes: 1 addition & 1 deletion build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ if [ "${build_classical}" == "1" ]; then

# Editor
binname="${godot_basename}_android_editor.apk"
cp out/android/tools/android_editor.apk ${reldir}/${binname}
cp out/android/tools/android_editor-release.apk ${reldir}/${binname}

# Templates
cp out/android/templates/*.apk ${templatesdir}/
Expand Down
22 changes: 22 additions & 0 deletions config.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,25 @@ export APPLE_ID_PASSWORD=""
export NUGET_SOURCE="nuget.org"
# API key for publishing NuGet packages to nuget.org
export NUGET_API_KEY=""

# MavenCentral (sonatype) credentials
export OSSRH_GROUP_ID=""
export OSSRH_USERNAME=""
export OSSRH_PASSWORD=""
# Sonatype assigned ID used to upload the generated artifacts
export SONATYPE_STAGING_PROFILE_ID=""
# Used to sign the artifacts after they're built
# ID of the GPG key pair, the last eight characters of its fingerprint
export SIGNING_KEY_ID=""
# Passphrase of the key pair
export SIGNING_PASSWORD=""
# Base64 encoded private GPG key
export SIGNING_KEY=""

# Android signing configs
# Path to the Android keystore file used to sign the release build
export GODOT_ANDROID_SIGN_KEYSTORE=""
# Key alias used for signing the release build
export GODOT_ANDROID_KEYSTORE_ALIAS=""
# Password for the key used for signing the release build
export GODOT_ANDROID_SIGN_PASSWORD=""

0 comments on commit 31163f8

Please sign in to comment.