diff --git a/.github/actions/javascript/checkAndroidStatus/action.yml b/.github/actions/javascript/checkAndroidStatus/action.yml index cc064c6aa2ab..aae719fbd990 100644 --- a/.github/actions/javascript/checkAndroidStatus/action.yml +++ b/.github/actions/javascript/checkAndroidStatus/action.yml @@ -13,6 +13,8 @@ inputs: outputs: HALTED: description: True if the app is halted, false otherwise + COMPLETED: + description: True if the app is completed a rollout, false otherwise ROLLOUT_PERCENTAGE: description: The calculated rollout percentage runs: diff --git a/.github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts b/.github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts index d9bae61eb424..86e7000b9977 100644 --- a/.github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts +++ b/.github/actions/javascript/checkAndroidStatus/checkAndroidStatus.ts @@ -6,8 +6,9 @@ import GithubUtils from '@github/libs/GithubUtils'; const PACKAGE_NAME = core.getInput('PACKAGE_NAME', {required: true}); const GOOGLE_KEY_FILE = core.getInput('GOOGLE_KEY_FILE', {required: true}); const HALTED_STATUS = 'halted'; +const COMPLETED_STATUS = 'completed'; -async function checkAndroidStatus() { +async function checkAndroidStatus(): Promise { const auth = new google.auth.GoogleAuth({ keyFile: GOOGLE_KEY_FILE, scopes: ['https://www.googleapis.com/auth/androidpublisher'], @@ -38,9 +39,15 @@ async function checkAndroidStatus() { // Check if the status is halted const HALTED = status === HALTED_STATUS; core.setOutput('HALTED', HALTED); + + // Check if the status is completed + const COMPLETED = status === COMPLETED_STATUS; + core.setOutput('COMPLETED', COMPLETED); + + return status; } catch (error) { console.error('Error checking track status:', error); - process.exit(1); + throw error; } } diff --git a/.github/actions/javascript/checkAndroidStatus/index.js b/.github/actions/javascript/checkAndroidStatus/index.js index 3cfd1351c434..1fa3a285854a 100644 --- a/.github/actions/javascript/checkAndroidStatus/index.js +++ b/.github/actions/javascript/checkAndroidStatus/index.js @@ -736922,6 +736922,7 @@ const GithubUtils_1 = __importDefault(__nccwpck_require__(19296)); const PACKAGE_NAME = core.getInput('PACKAGE_NAME', { required: true }); const GOOGLE_KEY_FILE = core.getInput('GOOGLE_KEY_FILE', { required: true }); const HALTED_STATUS = 'halted'; +const COMPLETED_STATUS = 'completed'; async function checkAndroidStatus() { const auth = new googleapis_1.google.auth.GoogleAuth({ keyFile: GOOGLE_KEY_FILE, @@ -736948,10 +736949,14 @@ async function checkAndroidStatus() { // Check if the status is halted const HALTED = status === HALTED_STATUS; core.setOutput('HALTED', HALTED); + // Check if the status is completed + const COMPLETED = status === COMPLETED_STATUS; + core.setOutput('COMPLETED', COMPLETED); + return status; } catch (error) { console.error('Error checking track status:', error); - process.exit(1); + throw error; } } async function getLatestReleaseDate() { diff --git a/.github/workflows/androidBump.yml b/.github/workflows/androidBump.yml index 03880139c258..cb33cb8da4c4 100644 --- a/.github/workflows/androidBump.yml +++ b/.github/workflows/androidBump.yml @@ -41,9 +41,10 @@ jobs: - name: Update Rollout Percentage with Fastlane # We should not rollout if the release is halted or the rollout percentage is completed - if: ${{ steps.checkAndroidStatus.outputs.HALTED == 'false' && steps.checkAndroidStatus.outputs.ROLLOUT_PERCENTAGE != '-1' }} + if: ${{ steps.checkAndroidStatus.outputs.HALTED == 'false' && steps.checkAndroidStatus.outputs.COMPLETED == 'false' && steps.checkAndroidStatus.outputs.ROLLOUT_PERCENTAGE != '-1' }} run: | echo "HALTED: ${{ steps.checkAndroidStatus.outputs.HALTED }}" + echo "COMPLETED: ${{ steps.checkAndroidStatus.outputs.COMPLETED }}" echo "ROLLOUT_PERCENTAGE: ${{ steps.checkAndroidStatus.outputs.ROLLOUT_PERCENTAGE }}" bundle exec fastlane android update_hybrid_rollout rollout:${{ steps.checkAndroidStatus.outputs.ROLLOUT_PERCENTAGE }}