From 066ca8c685fe570cf78dbacdfc0b43dfc0bef720 Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Tue, 10 Oct 2023 02:59:47 +0530 Subject: [PATCH] Upload path fixed --- .github/workflows/newBuild.yml | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/newBuild.yml b/.github/workflows/newBuild.yml index 70ee62e6..f5e0837d 100644 --- a/.github/workflows/newBuild.yml +++ b/.github/workflows/newBuild.yml @@ -8,22 +8,20 @@ on: required: true type: choice options: - - qa - - dev - - prod + - QA + - Prod flavor: description: Choose build flavour required: true type: choice options: - - field - - calling + - fieldAgents + - callingAgents type: description: Choose build type required: true type: choice options: - - debug - release version_code: description: Enter app version code (example, 292) @@ -77,21 +75,21 @@ jobs: run: chmod +x android/gradlew - name: Create local.properties run: cd android && touch local.properties && echo "sdk.dir = /home/USERNAME/Android/Sdk" > local.properties - - name: Assemble with Stacktrace - QA debug - if: ((github.event.inputs.environment == 'qa' || inputs.environment == 'qa') && (github.event.inputs.type == 'debug' || inputs.type == 'debug') && (github.event.flavor.type == 'field' || inputs.flavor == 'field')) - run: yarn move:qa && yarn debug && cd android && ./gradlew assemblefieldAgentsQARelease - - name: Assemble with Stacktrace - Dev debug - if: ((github.event.inputs.environment == 'dev' || inputs.environment == 'dev') && (github.event.inputs.type == 'debug' || inputs.type == 'debug')) - run: yarn move:dev && yarn debug && cd android && ./gradlew assembleDebug - name: Assemble with Stacktrace - Field QA release - if: ((github.event.inputs.environment == 'qa' || inputs.environment == 'qa') && (github.event.inputs.type == 'release' || inputs.type == 'release') && (github.event.flavor.type == 'field' || inputs.flavor == 'field')) + if: ((github.event.inputs.environment == 'QA' || inputs.environment == 'QA') && (github.event.flavor.type == 'fieldAgents' || inputs.flavor == 'fieldAgents')) run: yarn move:qa && cd android && ./gradlew assemblefieldAgentsQARelease - - name: Assemble with Stacktrace - Dev release - if: ((github.event.inputs.environment == 'dev' || inputs.environment == 'dev') && (github.event.inputs.type == 'debug' || inputs.type == 'release')) - run: yarn move:dev && cd android && ./gradlew assembleRelease + - name: Assemble with Stacktrace - Field PROD release + if: ((github.event.inputs.environment == 'Prod' || inputs.environment == 'Prod') && (github.event.flavor.type == 'fieldAgents' || inputs.flavor == 'fieldAgents')) + run: yarn move:qa && cd android && ./gradlew assemblefieldAgentsProdRelease + - name: Assemble with Stacktrace - Field QA release + if: ((github.event.inputs.environment == 'QA' || inputs.environment == 'QA') && (github.event.flavor.type == 'callingAgents' || inputs.flavor == 'callingAgents')) + run: yarn move:qa && cd android && ./gradlew assemblefieldAgentsQARelease + - name: Assemble with Stacktrace - Field PROD release + if: ((github.event.inputs.environment == 'Prod' || inputs.environment == 'Prod') && (github.event.flavor.type == 'callingAgents' || inputs.flavor == 'callingAgents')) + run: yarn move:qa && cd android && ./gradlew assemblefieldAgentsProdRelease - name: Upload APK as Artifact uses: actions/upload-artifact@v3 with: - name: app-${{ github.event.inputs.type || inputs.type }} - path: android/app/build/outputs/apk/${{ github.event.inputs.type || inputs.type }}/ + name: app-${{ github.event.inputs.type || inputs.type }}-v${{ github.event.inputs.version_code || inputs.version_code }}-name-${{github.event.inputs.version_code || inputs.version_name}} + path: android/app/build/outputs/apk/${{ github.event.inputs.flavor || inputs.flavor }}${{github.event.inputs.environment || inputs.environment}}/${{github.event.inputs.type || inputs.type}} retention-days: 30