Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/javascript/checkAndroidStatus/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB: we're not using the returned Promise anywhere?

const auth = new google.auth.GoogleAuth({
keyFile: GOOGLE_KEY_FILE,
scopes: ['https://www.googleapis.com/auth/androidpublisher'],
Expand Down Expand Up @@ -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;
}
}

Expand Down
7 changes: 6 additions & 1 deletion .github/actions/javascript/checkAndroidStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/androidBump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
Loading