I'm trying to setup a Firebase Distrbution pipeline in Github Actions and I have the following check_and_deploy.yml:
name: Android CI
on:
push:
# tags:
# - 'v*'
pull_request:
branches:
- main
jobs:
test:
name: unit-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Unit tests
run: ./gradlew test --stacktrace
build:
name: build
# needs: [test]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Generate Release APK
run: ./gradlew assembleRelease
- name: Sign APK
uses: ilharp/sign-android-release@v1
# ID used to access action output
id: sign_app
with:
releaseDir: app/build/outputs/
signingKey: ${{ secrets.SIGNING_KEY }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- uses: actions/upload-artifact@v3
with:
name: release.apk
path: /home/runner/work/myapp/myapp
- uses: actions/upload-artifact@v3
with:
name: mapping.txt
path: app/build/outputs/mapping/release/mapping.txt
deploy-firebase:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
id: download
with:
name: release.apk
- name: 'Echo download path'
run: echo ${{steps.download.outputs.download-path}}
- name: unzip downloaded APK
run: unzip ${{steps.download.outputs.download-path}}/release.apk
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{secrets.SERVICE_ACCOUNT}}
groups: Testers
file: app-release-unsigned-signed.apk
However, when it's being run in Github Actions I'm getting:
In the actions-download@v3 artifact:
Artifact release.apk was downloaded to /home/runner/work/myapp/myapp
Artifact download has finished successfully
But then during the unzip downloaded APK:
Run unzip /home/runner/work/myapp/myapp/release.apk
unzip /home/runner/work/myapp/myapp/release.apk
shell: /usr/bin/bash -e ***0***
unzip: cannot find or open /home/runner/work/myapp/myapp/release.apk, /home/runner/work/myapp/myapp/release.apk.zip or /home/runner/work/myapp/myapp/release.apk.ZIP.
Error: Process completed with exit code 9.
Is there something I'm doing wrong here?
Thanks!
release.apkin the directory, has it the right size and are the folder permissions correctly set? Just for stating out the obvious :)app-prod-release-unsigned-signed.apkwhich I tried to use but I'm getting the same error: ``` deploy-firebase: needs: [ build ] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v3 id: download with: name: app-prod-release-unsigned-signed.apk - name: unzip downloaded APK run: unzip app-prod-release-unsigned-signed.apk ```run: | ls -al /home/runner/work/myapp/myapp pwdmake sure the file is there and check the current working directory