-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub CI/CD pipeline for automated APK builds and releases #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: simonvar <10325034+simonvar@users.noreply.github.com>
Co-authored-by: simonvar <10325034+simonvar@users.noreply.github.com>
Co-authored-by: simonvar <10325034+simonvar@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements automated CI and CD for the Android app by adding GitHub Actions workflows, updating build dependencies, and enhancing README documentation.
- Adds unit and instrumentation test dependencies in
app/build.gradle - Introduces a CI workflow to run tests and build/upload debug APKs
- Introduces a release workflow to build, verify, and publish release APKs
- Updates README with badges and usage instructions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/build.gradle | Added testImplementation and androidTestImplementation dependencies |
| README.md | Documented CI/CD pipeline, added workflow badges |
| .github/workflows/release.yml | New workflow to assemble and publish release APK |
| .github/workflows/ci.yml | New workflow to run unit tests and assemble debug APK |
Comments suppressed due to low confidence (5)
app/build.gradle:74
- You added Android instrumentation test dependencies but the CI workflow doesn't install an emulator or run
connectedAndroidTest. Consider adding emulator setup and an instrumentation test step in the CI workflow or removing unused dependencies.
testImplementation 'junit:junit:4.13.2'
.github/workflows/release.yml:47
- Checking for an APK with a glob in
-fmay not behave as expected if no files match or multiple files exist. Consider using the capturedAPK_PATHvariable in an-f "$APK_PATH"check for more reliable validation.
if [ ! -f app/build/outputs/apk/release/*.apk ]; then
.github/workflows/release.yml:27
- The
setup-androidaction installs only basic SDK components by default. Explicitly install required SDK platforms and build-tools (e.g., viasdkmanager 'platforms;android-31' 'build-tools;31.0.0') to ensure consistent builds.
uses: android-actions/setup-android@v3
.github/workflows/ci.yml:24
- Similarly, in the CI workflow you should explicitly install your project's target SDK and build-tools via
sdkmanagerto avoid missing component errors during the debug build.
uses: android-actions/setup-android@v3
.github/workflows/ci.yml:46
- [nitpick] The debug APK upload step only runs on push events. You may want to also upload artifacts for pull_request events so reviewers can download the APK generated by PRs.
if: github.event_name == 'push'
This PR implements a comprehensive GitHub Actions CI/CD pipeline for automated building and releasing of Android APK artifacts.
Features Added
🚀 Release Workflow (
.github/workflows/release.yml)v*(e.g.,v2.0,v2.1)release/*branches🔧 CI Workflow (
.github/workflows/ci.yml)master,main,develop)./gradlew test📚 Documentation & Monitoring
Technical Implementation
GITHUB_TOKENfor authenticated GitHub operationsUsage Examples
Create a new release by pushing a version tag:
Or create a release branch:
The pipeline will automatically build the APK and publish it to the GitHub releases page.
Fixes #4.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.google.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx2048M -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-7.4-bin/c0gwcg53nkjbqw7r0h0umtfvt/gradle-7.4/lib/gradle-launcher-7.4.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.4(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.