Skip to content

Commit

Permalink
Update build_android_apk.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Did-Dog committed Jan 21, 2024
1 parent be70dba commit 1d0bf67
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build_android_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
# guide https://github.com/marketplace/actions/automated-build-android-app-with-github-action
name: Build Android APK
run-name: ${{ github.event.inputs.repository }}:${{ github.event.inputs.taskName }}

env:
# The name of the main module repository
main_project_module: workspace

on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -36,10 +39,10 @@ jobs:
java-version: ${{ github.event.inputs.jdkVersion }}

- name: Clone project
run: git clone --depth=1 ${{ github.event.inputs.repository }} workspace
run: git clone --depth=1 ${{ github.event.inputs.repository }} ${{ env.main_project_module }}

- name: Build APK
working-directory: ./workspace
working-directory: ./${{ env.main_project_module }}
run: |
if [ ! -f "gradlew" ]; then gradle wrapper; fi
chmod +x gradlew
Expand All @@ -48,6 +51,6 @@ jobs:
- name: Upload the APK artifact with 1 day retention
uses: actions/upload-artifact@v3
with:
path: workspace/app/build/outputs/apk/debug/app-debug.apk
name: apk-debug [${{ env.date_today }}].apk
path: ${{ env.main_project_module }}/app/build/outputs/apk/debug/
name: apk-debug [${{ env.date_today }}]
retention-days: 1

0 comments on commit 1d0bf67

Please sign in to comment.