diff --git a/.github/workflows/gradle.yaml b/.github/workflows/gradle.yaml index 5a05a9393..c6a9c38c6 100644 --- a/.github/workflows/gradle.yaml +++ b/.github/workflows/gradle.yaml @@ -126,7 +126,7 @@ jobs: ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} ANDROID_KEY_PASSWD: ${{ secrets.ANDROID_KEY_PASSWD }} - - name: Upload the Android Build Artifact + - name: Upload the Android build artifact uses: actions/upload-artifact@v5 with: # Artifact name @@ -148,6 +148,24 @@ jobs: files: | ./SlimeVR-android.apk + - name: Build Google Play release bundle + if: startsWith(github.ref, 'refs/tags/') + run: ./gradlew :server:android:bundleRelease + env: + ANDROID_STORE_FILE: ${{ secrets.ANDROID_GPLAY_STORE_FILE }} + ANDROID_STORE_PASSWD: ${{ secrets.ANDROID_GPLAY_STORE_PASSWD }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_GPLAY_KEY_ALIAS }} + ANDROID_KEY_PASSWD: ${{ secrets.ANDROID_GPLAY_KEY_PASSWD }} + + - name: Upload the Google Play artifact + uses: actions/upload-artifact@v5 + if: startsWith(github.ref, 'refs/tags/') + with: + # Artifact name + name: 'SlimeVR-Google-Play-Upload' # optional, default is artifact + # A file, directory or wildcard pattern that describes what to upload + path: server/android/build/outputs/bundle/release/* + bundle-linux: strategy: matrix: diff --git a/server/android/build.gradle.kts b/server/android/build.gradle.kts index 87fd154b5..a39e4bb1a 100644 --- a/server/android/build.gradle.kts +++ b/server/android/build.gradle.kts @@ -5,7 +5,7 @@ * For more details take a look at the Java Libraries chapter in the Gradle * User Manual available at https://docs.gradle.org/6.3/userguide/java_library_plugin.html */ -import com.android.build.gradle.tasks.PackageApplication +import com.android.build.gradle.internal.tasks.BaseTask import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -51,7 +51,7 @@ val preSign = tasks.register("preSign") { val postSign = tasks.register("postSign") { finalizedBy(deleteTempKeyStore) } -tasks.withType { +tasks.withType { dependsOn(preSign) finalizedBy(postSign) }