Closed abhi8422 closed 4 years ago
Could you please post your workflow YAML configuration? (or at least the signing portion of it)
name: Android CI on: push: branches: [ master ] pull_request: branches: [ master ]
jobs: apk: name: Generate APK runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build debug APK
run: bash ./gradlew assembleDebug --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: app
path: app/build/outputs/apk/debug/app-debug.apk
- name: Sign Android release
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
Pushing it on the master branch.
Okay so here:
bash ./gradlew assembleDebug --stacktrace
you are building the debug
variant of your application (which, btw, you should be able to just call ./gradlew assembleDebug --stacktrace
without the bash
command, hence why the ./
is there)
And in your signing configuration, you are specifying the /release folder for your apk outputs which is why the action can't find any apks. What you should be doing is running ./gradlew assembleRelease
to assemble the release build of your app. This means you'll have to update your upload-artifact action as well to point to the release build too.
name: Assemble Release Bundle run: | ./gradlew bundleRelease
Working now. Thank You.
The action is working fine but in Artifacts, it's giving me three .apk files
Workflow code->
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build
run: ./gradlew build
- name: Assemble Release Bundle
run: |
./gradlew assembleRelease
- name: Sign Release
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: app
path: app/build/outputs/apk/release
Yes, I should probably have the action clean up it's "mess". This action generates the -aligned.apk
when it zipaligns the APK, and then generates the -signed.apk
version when it actually signs it. I'm going to close this issue and open a new one to remind me to do so
Hi @r0adkll Please help me to fix this issue:
My Source code:
- name: Sign APK
uses: r0adkll/sign-android-release@v1
# ID used to access action output
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGN_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASS }}
keyPassword: ${{ secrets.KEY_PASS }}
- name: Upload file to github
uses: actions/upload-artifact@v2
with:
name: App Release
path: ${{steps.sign_app.outputs.signedReleaseFile}}
[error]ENOENT: no such file or directory, scandir 'app/build/outputs/apk/release'