-
Notifications
You must be signed in to change notification settings - Fork 1
Add workflow to build and upload debug APKs #9
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| 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 }} | ||
Oops, something went wrong.
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.
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.
🧩 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-releaseto the latest major version.The current version
v1is outdated. The latest release isv2.5.0. Update tov2to ensure compatibility and access to recent bug fixes and improvements.🧰 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