diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 64e2083..7b08f64 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -36,6 +36,10 @@ jobs: - name: List APK outputs run: ls -R app/build/outputs/apk + - name: Debug APK + run: ls -R app + + - name: Create GitHub Release and Upload APK uses: softprops/action-gh-release@v2 with: diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e0eaa6a..ad18855 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -17,7 +17,7 @@ android { minSdk = 30 targetSdk = 36 versionCode = 6 - versionName = "1.0.6" + versionName = "1.0.7" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -95,4 +95,21 @@ dependencies { androidTestImplementation(libs.androidx.compose.ui.test.junit4) debugImplementation(libs.androidx.compose.ui.tooling) debugImplementation(libs.androidx.compose.ui.test.manifest) -} \ No newline at end of file +} + +android.applicationVariants.all { + if (buildType.name == "release") { + outputs.all { + val outputFile = this.outputFile + val copyTaskName = "copy${name.capitalize()}Apk" + + tasks.register(copyTaskName) { + from(outputFile) + into("${rootProject.projectDir}/app/release") + rename { "app-release.apk" } + } + + assembleProvider.get().finalizedBy(copyTaskName) + } + } +}