expo-github-action
expo-github-action copied to clipboard
How to automate expo upload:android
Hello! It's me again 😄
Topic and scope of discussion
How would you pass service account JSON to expo upload:android
?
Motivation
I want to create a manually triggered Github action to automate uploads to Play Store?
Additional context
expo upload:android
requires the --path
to the JSON file containing the service account. I dug into the expo-cli code and they use fs.readFile to get the content so not sure how to make it available inside the Github actions. Do you know a way to provide it?
Hi @dmiranda2791! Having "secret files" instead of "secret env vars" is a bit harder, but not impossible 😄 You are lucky that the Google Service file is a JSON file, meaning you can easily serialize and deserialize to and from a string. I would recommend putting the contents of your Google Service file into a secret envvar, and use this to convert it to a file.
After that, you can simply point to your newly created file and continue the process. Let me know if that works for you!
Thanks! I'll give it a try 😁
I'll told you how it goes
Thank you @byCedric! It worked perfectly, I have automated uploads Play Store now 😁
Awesome, I'll keep this issue open to add it as an example!