Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
luxaritas committed Sep 6, 2024
1 parent 7bd84ec commit 207fcf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/google-play/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const PACKAGE_NAME = 'org.eternagame.mob';
const args = parseArgs();
const playStoreApi = await PlayStoreApi.create(args.apiKey);
if (args.mode === 'upload') {
console.log('Starting Upload')
const editId = await playStoreApi.insertEdit(PACKAGE_NAME);
await playStoreApi.uploadBundle(PACKAGE_NAME, editId, args.bundlePath);
await playStoreApi.commitEdit(PACKAGE_NAME, editId);
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/google-play/src/play-store-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export class PlayStoreApi {
assertion: authToken
}).toString()
});
if (res.status === 400) {
console.log('Access token status', res.status, res.statusText, await res.json())
}
const parsed = await res.json();
return new PlayStoreApi(parsed['access_token']);
}
Expand Down Expand Up @@ -81,11 +84,12 @@ export class PlayStoreApi {
}

async commitEdit(packageName, editId) {
await fetch(`https://androidpublisher.googleapis.com/androidpublisher/v3/applications/${packageName}/edits/${editId}:commit`, {
const res = await fetch(`https://androidpublisher.googleapis.com/androidpublisher/v3/applications/${packageName}/edits/${editId}:commit`, {
method: 'POST',
headers: {
Authorization: `Bearer ${this.accessToken}`,
},
});
console.log('Commit response', res.status, res.statusText)
}
}

0 comments on commit 207fcf5

Please sign in to comment.