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
48 changes: 48 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Android CI
on:
push:
branches: [ "deploy" ]
workflow_dispatch:
jobs:
build:

Expand All @@ -23,3 +24,50 @@ jobs:
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build

---------

name: Android Release Build

on:
push:
branches:
- deploy

jobs:
build:
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout Code
uses: actions/checkout@v4

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

# Create local.properties file dynamically
- name: Create local.properties
run: |
echo "google-web-client-id=${{ secrets.GOOGLE_WEB_CLIENT_ID }}" > local.properties
echo "sdk.dir=${{ env.ANDROID_SDK_ROOT }}" >> local.properties

# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Build the APK with Gradle (Release build)
- name: Build APK (Release)
run: ./gradlew assembleRelease

# Upload the APK as an artifact (optional)
- name: Upload APK artifact
uses: actions/upload-artifact@v3
with:
name: app-release-apk
path: app/build/outputs/apk/release/app-release-by-action.apk