Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and Attach ALL Debug APKs to Release

on:
release:
types: [published]

jobs:
build_and_attach:
runs-on: ubuntu-latest
if: github.event.release.prerelease == false && github.event.release.draft == false

steps:
- name: ⚙️ Checkout Repository
uses: actions/checkout@v4

- name: ☕ Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: 📁 Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: 🔨 Build ALL Debug APKs
run: |
# This command builds the debug variant for ALL application modules found in the project.
# The resulting APKs will be scattered in their respective module build directories.
./gradlew assembleDebug

# Define the path to ALL generated APK files
# This step finds all files ending in -debug.apk within the build/outputs/apk/debug folders across the repo.
- 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: 📝 Show built APK paths
run: |
echo "Found the following APKs to upload:"
echo "${{ steps.apk_paths.outputs.APK_FILES }}"

# Upload ALL the built APKs as release assets
- name: 📤 Upload ALL APKs to Release Assets
uses: softprops/action-gh-release@v2
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 }}
Comment on lines +52 to +58

Copy link
Copy Markdown
Contributor

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.

Loading