Added cleanup to generated service account file (#116)

Co-authored-by: Drew Heavner <veedubusc@gmail.com>
This commit is contained in:
Jack Boswell
2022-06-18 18:32:34 +12:00
committed by GitHub
parent 642ba59b8a
commit 7b7381ed55
2 changed files with 8 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -121,7 +121,13 @@ async function run() {
console.log(`Finished uploading to the Play Store: ${result}`)
} catch (error: any) {
core.setFailed(error.toString())
core.setFailed(error.message)
} finally {
if (core.getInput('serviceAccountJsonPlainText', { required: false})) {
// Cleanup our auth file that we created.
core.debug('Cleaning up service account json file');
fs.unlinkSync('./serviceAccountJson.json');
}
}
}