diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml new file mode 100644 index 0000000..0ec37ea --- /dev/null +++ b/.github/workflows/android_build.yml @@ -0,0 +1,15 @@ +name: Android Build CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + build-qa-debug: + uses: ./.github/workflows/generate_apk.yml \ No newline at end of file diff --git a/.github/workflows/generate_apk.yml b/.github/workflows/generate_apk.yml new file mode 100644 index 0000000..e68fdcf --- /dev/null +++ b/.github/workflows/generate_apk.yml @@ -0,0 +1,37 @@ +name: Generate APK CI + +on: + workflow_call: + inputs: + environment: + description: Build environment passed from caller workflow + required: true + type: string + type: + description: Build type passed from caller workflow + required: true + type: string + +jobs: + generate: + runs-on: [ default ] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Log Build Metadata + run: | + echo "Commit SHA: ${{ github.sha }}" + echo "Build Environment: ${{ github.event.inputs.environment || inputs.environment }}" + echo "App Version Code: $(awk '/VERSION_CODE/ {print $4}' app/build.gradle)" + echo "App Version Name: $(awk '/VERSION_NAME/ {print $4}' app/build.gradle | tr -d '"')" + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: adopt + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Assemble with Stacktrace + run: ./gradlew assembleDebug --stacktrace \ No newline at end of file