Skip to content

Commit

Permalink
Merge pull request #7 from enm10k/feature/sign-apk
Browse files Browse the repository at this point in the history
Sign APK
  • Loading branch information
enm10k authored Apr 14, 2024
2 parents d951dee + 07df789 commit 70f1241
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ jobs:
- name: Build Android Binary
run: flutter build apk

- name: Sign APK
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#android
run: |
python3 -c 'import os, base64; open("output.jks", "wb").write(base64.b64decode(os.environ.get("SIGNING_KEY_BASE64")))'
"$ANDROID_HOME/build-tools/34.0.0/apksigner" sign --ks output.jks -v --v2-signing-enabled true --ks-key-alias "$SIGNING_KEY_ALIAS" --ks-pass "pass:$KEY_STORE_PASSWORD" "$APK_PATH"
env:
SIGNING_KEY_BASE64: ${{ secrets.SIGNING_KEY }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
APK_PATH: build/app/outputs/flutter-apk/app-release.apk

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
Expand Down
18 changes: 13 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,19 @@ android {
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
// release {
// // TODO: Add your own signing config for the release build.
// // Signing with the debug keys for now, so `flutter run --release` works.
// signingConfig signingConfigs.debug
// }
}

// https://github.com/enm10k/nocodb-mobile/issues/6
dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false
// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}
}

Expand Down

0 comments on commit 70f1241

Please sign in to comment.