AppCenter-Github-Action icon indicating copy to clipboard operation
AppCenter-Github-Action copied to clipboard

When Trying to upload an APK, *.apk doesn't work, It throws file not found error

Open kuwrom opened this issue 2 years ago • 3 comments

When the apk name contains version name, we can't just hard code the apk path/ file. How would it be possible to pass the file name

kuwrom avatar Jun 08 '22 09:06 kuwrom

faced same issue today

Ievhenii365 avatar Apr 24 '23 17:04 Ievhenii365

My workaround was the following:

- name: Get path of created apk
  id: retrieve-path
  run: echo "path=$(find app/build/outputs/apk/ -type f -name '*.apk')" >> $GITHUB_OUTPUT

- name: Upload to App Center
  uses: wzieba/[email protected]
  with:
    appName: my-app
    file: ${{steps.retrieve-path.outputs.path}}

While it does work for me, i'm an absolute noob, so please don't just copy/paste, but check for yourself

MarcelReiter avatar May 16 '23 15:05 MarcelReiter

@MarcelReiter thats a great answer...i just did a simple find first and copied the output and put it in file path for the next run. But for OP this is the path of the .apk ./android/app/build/outputs/apk/debug/<appName>.apk

      - name: Locate APK file
        run: |
          find . -name '*.apk'

    - name: upload artefact to App Center
        uses: wzieba/AppCenter-Github-Action@v1
        with:
          appName: templateApp
          token: ${{secrets.APP_CENTER_TOKEN}}
          group: Testers
          file: ./android/app/build/outputs/apk/debug/templateApp-debug.apk     <<
          notifyTesters: true
          debug: true

daskabe avatar Dec 07 '23 02:12 daskabe