Now that I have a business of my own, I’ve started making continuous deployments for them to carry on the tradition. When I was younger, I used to visit my grandmother’s house, and she would always have deliciously efficient continuous deployment pipelines put out for all the children to enjoy. Today, we’ll be going step-by-step on how to set up continuous deployment for a Unity WebGL production build. No additional fastlane configuration is needed, which was a pleasant surprise, it actually works with just the right parameters passed in.Last time, we discussed the basics of how to ensure that Unity WebGL can run in a production environment, and now it’s time to dive further into that topic. Get your google key in json format and put it in as the env variable "PLAYSTORE_KEY". So just put that in a "upload.sh" file, add it as the post build file in the build config. # again and just control it with environment variables.įastlane supply -package_name "$PACKAGE_NAME" -aab "$UNITY_PLAYER_PATH" -json_key_data "$KEY_WITH_NEWLINES" -release-status draft -track internal # Also, you could put the "draft" and "internal" into environment variables if you want to never have to modify the script # fastlane thinks -e should mean the -env option and fails. # You could also use shorter argument names here, but DO NOT use -e for -release-status, there's some error there where KEY_WITH_NEWLINES=$(echo $PLAYSTORE_KEY | jq '.private_key |= sub(" (?!PRIVATE|KEY)" "\n" "g")' -c -j) # so we replaces spaces with "\n" signs again so it works properly. # Unity environment variables replace the "\n" signs from the private key with spaces for some reason, PACKAGE_NAME=$(cat "$WORKSPACE/build.json" | jq -j '.bundleid') # You can also just hardcode your package name, e.g. # $PLAYSTORE_KEY - The JSON file with the credentials for the Google Developer account # it in the environment variable PLAYSTORE_KEY in the Unity build config. # Passed in as environment variables from CI, you must get this from Google and put Now it's literally a 4 line script (minus comments), here it is: #!/bin/bash Used to have a ridiculously complicated bash script for this, until I realized that fastlane is installed, and you can easily use it in a bash script in the post build event. This is an old question, but still very valid.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |