Skip to content
Open
Show file tree
Hide file tree
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
19 changes: 9 additions & 10 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,32 @@ on:
workflow_dispatch:

jobs:
Gradle:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Running expo prebuild
run: bun run expo:prebuild
run: npx expo prebuild --platform android --no-install
- name: setup jdk
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Make Gradle executable
run: chmod +x ./gradlew
working-directory: android
- name: Build Release APK
run: ./gradlew assembleRelease

Release:
needs: Gradle
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:
Comment on lines 35 to +40
Copy link

Choose a reason for hiding this comment

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

🚨 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.

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ android {
applicationId 'com.involvex.awesomegithubapp'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 5
versionName "0.0.5"
versionCode 6
versionName "0.0.6"
Comment on lines +95 to +96

Choose a reason for hiding this comment

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

high

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
  1. The android/ and ios/ folders are generated via expo prebuild and should NOT be committed. This is part of the Continuous Native Generation (CNG) workflow. (link)


buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
}
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<item name="android:enforceNavigationBarContrast" tools:targetApi="29">true</item>
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
Comment on lines +6 to +7

Choose a reason for hiding this comment

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

high

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
  1. The android/ and ios/ folders are generated via expo prebuild and should NOT be committed. This is part of the Continuous Native Generation (CNG) workflow. (link)

</style>
<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/splashscreen_background</item>
Expand Down
Empty file modified android/gradlew
100644 → 100755
Empty file.