Skip to content

Add workflow to build and upload debug APKs#9

Merged
tejpratap46 merged 2 commits intomainfrom
chore/add-action-release-with-apk
Dec 12, 2025
Merged

Add workflow to build and upload debug APKs#9
tejpratap46 merged 2 commits intomainfrom
chore/add-action-release-with-apk

Conversation

@tejpratap46
Copy link
Owner

@tejpratap46 tejpratap46 commented Dec 12, 2025

This workflow builds all debug APKs and uploads them as release assets when a release is published.

Summary by CodeRabbit

  • Chores
    • Added automated workflow to build and upload debug packages automatically during the release process.

✏️ Tip: You can customize this high-level summary in your review settings.

This workflow builds all debug APKs and uploads them as release assets when a release is published.
@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

A new GitHub Actions workflow is introduced to automatically build debug APKs for all modules and upload them as release assets when a non-prerelease, non-draft release is published. The workflow discovers APK files post-build and conditionally uploads them if present.

Changes

Cohort / File(s) Summary
CI/CD Workflow
\.github/workflows/android-release\.yml
New workflow file for automated debug APK building and release asset uploading. Includes JDK 17 setup, Gradle configuration, assembleDebug task execution, APK discovery and path escaping, and conditional upload via softprops/action-gh-release when APKs are found.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Standard GitHub Actions workflow using established patterns
  • Single file addition with straightforward sequential steps
  • Conditional logic is simple and uses built-in GitHub Actions mechanisms

Poem

A workflow so swift, like a rabbit in flight, ✨
Building APKs through day and through night,
From checkout to upload, each step in its place,
Debug builds now race with elegant grace! 🐰🚀

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/add-action-release-with-apk

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c97d40 and e595edc.

📒 Files selected for processing (1)
  • .github/workflows/android-release.yml (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Note

Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

@tejpratap46 tejpratap46 self-assigned this Dec 12, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/android-release.yml (1)

34-45: Consider a simpler multi-line file handling approach.

The current approach using %0A escaping is non-standard. While it works because GitHub Actions interprets %0A as newlines, consider using a glob pattern or a simpler approach for clarity.

Alternative: Use a glob pattern directly without the find/escape logic:

-      - name: 📌 Define ALL APK Paths
-        id: apk_paths
-        run: |
-          # Finds all debug APKs in a standard Android project structure and saves them as a multi-line string.
-          # We use a glob search pattern here to find all of them.
-          FIND_COMMAND=$(find . -path '*/build/outputs/apk/debug/*-debug.apk' -type f)
-          
-          # We escape the newline characters for proper output handling in GitHub Actions
-          ESCAPED_PATHS="${FIND_COMMAND//$'\n'/%0A}"
-          
-          echo "APK_FILES=$ESCAPED_PATHS" >> $GITHUB_OUTPUT
+      - name: 📌 Verify APK Build
+        id: apk_paths
+        run: |
+          # Check if any debug APKs were built
+          if find . -path '*/build/outputs/apk/debug/*-debug.apk' -type f | grep -q .; then
+            echo "APK_FILES=true" >> $GITHUB_OUTPUT
+          fi

Then update the upload step:

       - name: 📤 Upload ALL APKs to Release Assets
         uses: softprops/action-gh-release@v1
-        if: steps.apk_paths.outputs.APK_FILES != ''
+        if: steps.apk_paths.outputs.APK_FILES == 'true'
         with:
-          # This variable now contains all paths, separated by newlines
-          files: ${{ steps.apk_paths.outputs.APK_FILES }}
+          # Use glob pattern for discovery
+          files: '**/build/outputs/apk/debug/*-debug.apk'
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c97d40 and 861df6d.

📒 Files selected for processing (1)
  • .github/workflows/android-release.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/android-release.yml

53-53: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build lyrics-maker
  • GitHub Check: Build app
  • GitHub Check: build
  • GitHub Check: dependency-submission

Comment on lines 52 to 58
- name: 📤 Upload ALL APKs to Release Assets
uses: softprops/action-gh-release@v1
if: steps.apk_paths.outputs.APK_FILES != ''
with:
# This variable now contains all paths, separated by newlines
files: ${{ steps.apk_paths.outputs.APK_FILES }}
token: ${{ secrets.GITHUB_TOKEN }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

softprops/action-gh-release latest version releases

💡 Result:

The latest release is v2.5.0 (released Dec 1, 2025). [1][2]

Sources:
[1] softprops/action-gh-release — Releases page.
[2] softprops/action-gh-release — repository README (usage).


Update softprops/action-gh-release to the latest major version.

The current version v1 is outdated. The latest release is v2.5.0. Update to v2 to ensure compatibility and access to recent bug fixes and improvements.

      - name: 📤 Upload ALL APKs to Release Assets
-       uses: softprops/action-gh-release@v1
+       uses: softprops/action-gh-release@v2
        if: steps.apk_paths.outputs.APK_FILES != ''
🧰 Tools
🪛 actionlint (1.7.9)

53-53: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
.github/workflows/android-release.yml around lines 52 to 58: the workflow pins
softprops/action-gh-release to the outdated tag v1; update the action reference
to the latest major version (use softprops/action-gh-release@v2 or @v2.5.0) so
the job uses the current release with bug fixes and improvements—replace the
uses line accordingly and keep the existing inputs (files and token) unchanged.

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Caution

⛔ There was a permission issue.

@tejpratap46 tejpratap46 merged commit 17d0be0 into main Dec 12, 2025
6 of 7 checks passed
@tejpratap46 tejpratap46 deleted the chore/add-action-release-with-apk branch December 12, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant