diff --git a/.github/workflows/build_android_apk.yml b/.github/workflows/build_android_apk.yml index 35a4877..3aeed59 100644 --- a/.github/workflows/build_android_apk.yml +++ b/.github/workflows/build_android_apk.yml @@ -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: @@ -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 @@ -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