Add GitHub CI/CD pipeline for automated APK builds and releases#5
Merged
Add GitHub CI/CD pipeline for automated APK builds and releases#5
Conversation
Co-authored-by: simonvar <10325034+simonvar@users.noreply.github.com>
Co-authored-by: simonvar <10325034+simonvar@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Make a github ci
Add GitHub CI/CD pipeline for automated APK builds and releases
Jul 4, 2025
simonvar
requested changes
Jul 4, 2025
Co-authored-by: simonvar <10325034+simonvar@users.noreply.github.com>
Contributor
Author
|
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.
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'
simonvar
approved these changes
Jul 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.