Skip to content

Commit

Permalink
Create gen-android-apk.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nisrulz authored Feb 8, 2024
1 parent 0d80022 commit 126cad0
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/gen-android-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Generate Android APK

env:
main_project_module: app
playstore_name: SpaceX

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set Up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'

- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Run tests
run: ./gradlew test

- name: Build project
run: ./gradlew build

- name: Build Debug APK - ${{ env.main_project_module }} module
run: ./gradlew assembleDebug

- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
paths: app/build/outputs/apk/debug

- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: true
files: app/build/outputs/apk/debug/app-debug.apk

0 comments on commit 126cad0

Please sign in to comment.