Signed APK + Auto-upload release from Build workflow#4
Conversation
lavilao
commented
Oct 4, 2025
- Sign release APK with temporary CI keystore (v1+v2) so it installs on devices like Redmi 9A.\n- Integrate GitHub Release upload into Build App workflow when the ref is a tag.\n- Remove separate release workflow to avoid duplication.\n- No secret keystore required; APKs are installable but not update-compatible across different keys (fine for CI test builds).
… (v1+v2) and auto-upload to Releases when building tags. Remove separate release workflow; integrate upload into build.
Summary of ChangesHello @lavilao, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces significant enhancements to the application's build process, primarily focusing on enabling signed APK generation within the CI environment. It configures the app/build.gradle file to conditionally apply signing configurations for release builds, utilizing environment variables for keystore details. This change aims to ensure that release APKs are properly signed for broader device compatibility and sets the stage for streamlining the CI/CD pipeline by integrating release uploads directly into the build workflow. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds APK signing to the Gradle build process, conditional on the presence of environment variables, and cleans up some comments. My review focuses on improving the robustness and readability of the new signing logic. I've suggested a change to ensure all required signing environment variables are present before attempting to configure signing, which will prevent potential build failures and make the script more maintainable.
| def hasSigning = System.getenv("SIGNING_STORE_FILE") != null | ||
| if (hasSigning) { | ||
| signingConfigs { | ||
| release { | ||
| storeFile file(System.getenv("SIGNING_STORE_FILE")) | ||
| storePassword System.getenv("SIGNING_STORE_PASSWORD") | ||
| keyAlias System.getenv("SIGNING_KEY_ALIAS") | ||
| keyPassword System.getenv("SIGNING_KEY_PASSWORD") | ||
| v1SigningEnabled true | ||
| v2SigningEnabled true | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
The current implementation checks only for SIGNING_STORE_FILE to decide if signing is enabled, which could lead to build failures if other necessary signing variables are missing. Additionally, System.getenv() is called multiple times for the same variables. You can improve this by fetching all environment variables into a map, checking for their presence, and then using the map to configure signing. This makes the code more robust, readable, and easier to maintain.
def signingProps = [
storeFile: System.getenv("SIGNING_STORE_FILE"),
storePassword: System.getenv("SIGNING_STORE_PASSWORD"),
keyAlias: System.getenv("SIGNING_KEY_ALIAS"),
keyPassword: System.getenv("SIGNING_KEY_PASSWORD")
]
def hasSigning = signingProps.every { it.value != null }
if (hasSigning) {
signingConfigs {
release {
storeFile file(signingProps.storeFile)
storePassword signingProps.storePassword
keyAlias signingProps.keyAlias
keyPassword signingProps.keyPassword
v1SigningEnabled true
v2SigningEnabled true
}
}
}