diff --git a/.github/workflows/release-apk.yml b/.github/workflows/release-apk.yml index c35957b..85b6eee 100644 --- a/.github/workflows/release-apk.yml +++ b/.github/workflows/release-apk.yml @@ -15,19 +15,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Format ref - id: format-ref - shell: bash - run: | - sha_short="$(echo "${{ github.sha }}" | head -c 8)" - ref="${sha_short}" - - if ${{ startsWith(github.ref, 'refs/tags/') }}; then - ref="${{ github.ref_name }}" - fi - - echo "::set-output name=value::${ref}" - - name: Restore Gradle cache uses: actions/cache@v3 with: @@ -50,8 +37,8 @@ jobs: popd mv \ - "juicy-noise-android/app/build/outputs/apk/debug/app-debug.apk" \ - "juicy-noise-${{ steps.format-ref.outputs.value }}.apk" + juicy-noise-android/app/build/outputs/apk/debug/*.apk \ + ./ - name: Upload artifacts for Android uses: actions/upload-artifact@v3 diff --git a/juicy-noise-android/app/build.gradle b/juicy-noise-android/app/build.gradle index 64d2970..c3d6032 100644 --- a/juicy-noise-android/app/build.gradle +++ b/juicy-noise-android/app/build.gradle @@ -45,6 +45,22 @@ android { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } + + splits { + abi { + enable true + reset() + include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' + universalApk true + } + } + + applicationVariants.all { variant -> + variant.outputs.all { output -> + def applicationName = variant.applicationId.tokenize('.')[2] + outputFileName = "${applicationName}-${variant.versionName}-${output.name}.apk" + } + } } dependencies {