Skip to content

Commit

Permalink
Add GitHub Actions workflow for building and releasing APK
Browse files Browse the repository at this point in the history
  • Loading branch information
miteshhq committed Dec 17, 2024
1 parent dd1bc5a commit c93a218
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Release APK

on:
push:
tags:
- 'v*' # Triggers only when you push a tag starting with 'v' (e.g., v1.0, v1.1)

jobs:
build:
name: Build and Release Android APK
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Set up Java and Gradle
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

# Step 3: Build the APK
- name: Build APK
run: |
chmod +x ./gradlew
./gradlew assembleDebug
# Step 4: Upload APK to GitHub Release
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: "app/build/outputs/apk/debug/app-debug.apk"
tag: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
name: "Release ${{ github.ref_name }}"
body: "This release includes the latest APK build."

0 comments on commit c93a218

Please sign in to comment.