Android Debug App is blocked by Play Protect when built with github action

Viewed 125

I have built a simple Mobile App with Ionic that i can build with Android Studio. When I do so, i can easily install the debug version on my phone. Eventhough I do not yet have a developer account or any keys to sign the App with.

Now, I have tried to build the application with the following github action

name: Build Android Debug

on:
  # Workflow is triggered when the main branch is changed (Push & Pull Request)
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

  # Manual dispatch of workflow also allowed
  workflow_dispatch:

jobs:
  build:
    # Build on Linux
    runs-on: ubuntu-latest

    steps:
      # check out source code
      - uses: actions/checkout@v2

      # Set up Java 11 environment
      - name: set up java 11
        uses: actions/setup-java@v1
        with:
          java-version: 11
        
      # Set up Nodejs enviroment
      - name: set up nodejs
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      # install ionic CLI
      - name: install ionic-cli
        run: npm install -g @ionic/cli
                
      # install all npm dependencies of project
      - name: install npm dependencies
        run: npm install
        
      # run the npm build script and sync it with the android project
      - name: build ionic app
        run: |
          ionic build
          ionic cap sync android
          
      # run the gradle android debug-build
      - name: build apk
        run: |
          cd android
          ./gradlew assembleDebug
          cd ..
      
      # upload the built APK to the artifacts of this run of the workflow
      - name: upload apk
        uses: actions/upload-artifact@v2
        with:
          name: android-apk
          path: android/app/build/outputs/apk/debug

It uploads the debug APK in a zip file into this run's assets. This APK however gets blocked by my phone, when I try to install it. How can I prevent that from happening?

0 Answers
Related