I have a React-native application. I am preparing Android continuous deployment through github-actions to Google Play Store.
I am using this library for signing the application: https://github.com/r0adkll/sign-android-release
I have the following yaml configuration file for github-action of release:
on: workflow_dispatch
name: Release to Google Play Store
jobs:
  beta-distribution:
    runs-on: ubuntu-latest
    name: Beta Distribution
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - uses: actions/setup-node@master
    - uses: c-hive/gha-yarn-cache@v1
    - name: Install node modules
      run: |
        yarn install
    - name: Cache Gradle Wrapper
      uses: actions/cache@v2
      with:
        path: ~/.gradle/wrapper
        key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
    - name: Cache Gradle Dependencies
      uses: actions/cache@v2
      with:
        path: ~/.gradle/caches
        key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
        restore-keys: |
          ${{ runner.os }}-gradle-caches-
    - name: Make Gradlew Executable
      run: cd android && chmod +x ./gradlew
    - name: Build Android App Bundle
      run: |
        cd android && ./gradlew bundleRelease --no-daemon
    - name: Sign App Bundle
      id: sign_app
      uses: r0adkll/sign-android-release@v1
      with:
        releaseDirectory: android/app/build/outputs/bundle/release
        signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
        alias: ${{ secrets.ANDROID_SIGNING_ALIAS }}
        keyStorePassword: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
        keyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
    - name: Upload Artifact
      uses: actions/upload-artifact@v2
      with:
        name: Signed App Bundle
        path: ${{steps.sign_app.outputs.signedReleaseFile}}
    - name: Deploy to Play Store (BETA)
      uses: r0adkll/upload-google-play@v1
      with:
        serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT }}
        packageName: com.wmsappbare
        releaseFile: a${{steps.sign_app.outputs.signedReleaseFile}}
        track: beta
        inAppUpdatePriority: 3
        userFraction: 0.5
        whatsNewDirectory: android/release-notes/
        # mappingFile: android/app/build/outputs/mapping/release/mapping.txt
I get an error in my github actions:
Preparing to sign key @ android/app/build/outputs/bundle/release with signing key /usr/bin/jarsigner -keystore android/app/build/outputs/bundle/release/signingKey.jks -storepass *** -keypass *** android/app/build/outputs/bundle/release/app-release.aab *** jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 54105 but got 55476 bytes)
Looks exactly the same as in answer:
But it does not make any sense to me. How can it be already signed?
https://github.com/r0adkll/sign-android-release/issues/31 In this issue I commented and a fellow developer said that I have my application already signed with "keystone" details.
I tried the steps he offered for my to try that are described in the issue as comments, however every step failed with a different error.
In my android/app folder I have the following files:
- build.gradle
 - debug.keystore
 - your_key_name.keystore
 
build.gradle:
I believe my build.gradle might have wrong signingConfigs sections but I am fully sure I understand how that works.