- I would like to access my build artifact on a Build Automation machine either for automatic upload to a storefront or to automate some part of the build process.
Resolution (setting up a post-build-script):
- Unity Build Automation allows users to execute a shell script after the checkout and before the build is executed.
- To set a post-build script to run, under the Advanced Settings tab of the build configuration, enter the file name (and path from the root of the project) in the post-build script field.
Sample Post-Build Bash Script
#This is a sample that will simply output the path to the build artifact
#IF we are using a Windows Builder and using the path to pass it to a native Windows application we need to properly convert the cygwin player path to windows format
if [[ "$BUILDER_OS" == "WINDOWS" ]]; then
PLAYER_PATH=$(cygpath -wa "$UNITY_PLAYER_PATH")