wzieba/Firebase-Distribution-Github-Action

Hi @mateuszkwiecinski We are also getting the same error but on the Ionic project. Can you help??

jmd9019 opened this issue · 1 comments

Hi @mateuszkwiecinski We are also getting the same error but on the Ionic project. Can you help??

name: Build Android

on: [push, pull_request]

jobs:
  build:
    name: Build APK
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - name: Install Capacitor
        run: npm install @capacitor/core

      - name: Install Ionic
        run: npm install -g @ionic/cli

      - name: Install app dependencies
        run: npm install

      - name: Add Android platform
        run: |
          ionic capacitor add android
          ls

      - name: Build Android Dev APK
        run: ionic capacitor build android

      - name: Sync dependencies
        run: npx capacitor sync

      - name: Update plugins
        run: npx jetify

      - name: Build Android Release APK
        run: ionic capacitor build android --release --prod

      - name: Make gradlew executable
        run: chmod +x ./gradlew
      - name: Generate the Android Apk
        working-directory: ./android/
        run: |
          ./gradlew assembleRelease
          cd app/build/outputs/apk/release
          ls
      - name: upload artifact to Firebase App Distribution
        uses: wzieba/Firebase-Distribution-Github-Action@v1
        with:
          appId: ${{secrets.FIREBASE_APP_ID}}
          token: ${{secrets.FIREBASE_TOKEN}}
          groups: via-driver-app
          file: app/build/outputs/apk/release/app-release-unsigned.apk 

Screenshot (83)

Originally posted by @jmd9019 in #51 (comment)

Have you tried, well... verifying if the file points to a binary? 😉
Looking at your config you change the working directory to ./android/ when running gradle, but it seems like you point elsewhere when referencing the apk file: app/build/outputs/apk/release/app-release-unsigned.apk.

If I had to guess, I'd try a file: android/app/build/outputs/apk/release/app-release-unsigned.apk 🤷
I don't believe there is anything this action can do, so I'm going to close the issue for now