Conversation
- Consolidate build and release jobs into a single workflow job - Update action versions (checkout@v4, setup-java@v4) - Fix working directory for Gradle commands (set to android/) - Correct path to release APK (android/app/build/outputs/apk/release/app-release.apk) - Use standard Expo prebuild command - Add GITHUB_TOKEN for release creation and asset upload Co-authored-by: involvex <39644169+involvex@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideConsolidates the Android CI workflow into a single build-and-release job that correctly prebuilds and builds the APK from the android/ directory, updates action versions and paths, wires up GitHub Releases with authentication, and bumps the Android app version and visual system bar styling. Sequence diagram for consolidated Android build-and-release jobsequenceDiagram
participant Dev as Developer
participant GH as GitHub
participant WF as ActionsWorkflow android.yml
participant JR as Job build-and-release
participant R as Runner ubuntu-latest
participant Expo as ExpoCLI
participant Gradle as GradleBuild
participant Rel as GitHubReleaseService
Dev->>GH: Push tag or dispatch workflow
GH-->>WF: Trigger workflow android.yml
WF-->>JR: Start job build-and-release
JR-->>R: Provision runner ubuntu-latest
R->>R: actions/checkout v4
R->>R: oven-sh/setup-bun v1
R->>R: bun install
R->>Expo: npx expo prebuild --platform android --no-install
Expo-->>R: Generate android project
R->>R: actions/setup-java v4 (Java 17 temurin)
R->>Gradle: chmod +x ./gradlew (working-directory android)
R->>Gradle: ./gradlew assembleRelease (working-directory android)
Gradle-->>R: Build APK at android/app/build/outputs/apk/release/app-release.apk
alt ref_type is tag
R->>Rel: softprops/action-gh-release v2 with APK path and GITHUB_TOKEN
Rel-->>Dev: Published release with attached APK
else ref_type is not tag
R-->>WF: Skip release step
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Android build and release process by rectifying previous workflow inefficiencies and outdated configurations. The changes streamline the build pipeline, ensuring reliable APK generation and proper artifact management for releases. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Switching from
bun run expo:prebuildtonpx expo prebuild --platform android --no-installbypasses any custom options in the existingexpo:prebuildscript; consider reusing the script or mirroring its flags to avoid divergence between local and CI builds. - If you want to speed up this consolidated workflow further, consider adding caching for Bun dependencies and Gradle (e.g., using
actions/cache) so repeated runs don’t reinstall everything from scratch.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Switching from `bun run expo:prebuild` to `npx expo prebuild --platform android --no-install` bypasses any custom options in the existing `expo:prebuild` script; consider reusing the script or mirroring its flags to avoid divergence between local and CI builds.
- If you want to speed up this consolidated workflow further, consider adding caching for Bun dependencies and Gradle (e.g., using `actions/cache`) so repeated runs don’t reinstall everything from scratch.
## Individual Comments
### Comment 1
<location path=".github/workflows/android.yml" line_range="35-40" />
<code_context>
- runs-on: ubuntu-latest
- steps:
+ working-directory: android
- name: Release to GitHub
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
- files: app/build/outputs/apk/release/app-release.apk
+ files: android/app/build/outputs/apk/release/app-release.apk
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
</code_context>
<issue_to_address>
**🚨 issue (security):** Explicitly set `permissions` for `GITHUB_TOKEN` to ensure the release step can write releases
`softprops/action-gh-release` requires `GITHUB_TOKEN` with `contents: write` to create or update releases. With newer GitHub defaults, `contents` may be read-only unless explicitly set. Please add a `permissions:` block (at workflow or job level) granting `contents: write` so this step continues to work reliably if defaults change.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - name: Release to GitHub | ||
| uses: softprops/action-gh-release@v2 | ||
| if: github.ref_type == 'tag' | ||
| with: | ||
| files: app/build/outputs/apk/release/app-release.apk | ||
| files: android/app/build/outputs/apk/release/app-release.apk | ||
| env: |
There was a problem hiding this comment.
🚨 issue (security): Explicitly set permissions for GITHUB_TOKEN to ensure the release step can write releases
softprops/action-gh-release requires GITHUB_TOKEN with contents: write to create or update releases. With newer GitHub defaults, contents may be read-only unless explicitly set. Please add a permissions: block (at workflow or job level) granting contents: write so this step continues to work reliably if defaults change.
There was a problem hiding this comment.
Code Review
This pull request updates the Android version and theme styles. However, the changes are applied directly to files within the android/ directory. According to the repository's GEMINI.md engineering standards (line 65), the android/ directory is generated by expo prebuild and should not be committed to version control. This practice, known as Continuous Native Generation (CNG), is a core convention for this project. To adhere to this, version changes should be made in app.json, and style changes should also be configured through app.json or other Expo APIs, not by editing native files directly. The android/ directory should be added to .gitignore to prevent these generated files from being tracked.
| versionCode 6 | ||
| versionName "0.0.6" |
There was a problem hiding this comment.
These version changes are applied to a generated file. According to the project's GEMINI.md guide (line 65), the android/ directory is managed by expo prebuild and should not be committed. The version and android.versionCode should be updated in app.json, and the android/ directory should be added to .gitignore.
References
- The
android/andios/folders are generated viaexpo prebuildand should NOT be committed. This is part of the Continuous Native Generation (CNG) workflow. (link)
| <item name="android:statusBarColor">@android:color/transparent</item> | ||
| <item name="android:navigationBarColor">@android:color/transparent</item> |
There was a problem hiding this comment.
These style changes are made directly in a native file that is part of the auto-generated android/ directory. Per the GEMINI.md guide (line 65), this directory should not be committed. To achieve transparent status and navigation bars, please configure this in app.json using the androidStatusBar and androidNavigationBar properties. This ensures your configuration is the source of truth and is not overwritten by expo prebuild.
References
- The
android/andios/folders are generated viaexpo prebuildand should NOT be committed. This is part of the Continuous Native Generation (CNG) workflow. (link)
Fixed the Android build and release workflow by addressing pathing issues, consolidating jobs for better performance, and updating outdated action versions. The workflow now correctly runs
expo prebuild, builds the APK within theandroid/directory, and uploads the resulting artifact to a GitHub Release.PR created automatically by Jules for task 14536346782417575066 started by @involvex
Summary by Sourcery
Update Android GitHub Actions workflow to build and release APKs from a single job and align app metadata with the new release.
Enhancements:
Build:
Deployment: