executing async long running tasks after build

I want to deploy the builds after finishing to PlayFab and our own Amazon S3 buckets, If i want to execute the relevant code in CloudBuild, since the methods are static void methods i have to block the method and as a result the upload job can not happen since I’m blocking the main thread, Is there any way to do this or i have to setup some webhook and at success event download the artifacts and do whatever i want with them.

Perhaps you can start an upload method on another thread and block the current (scripting thread) until that operation is complete ?

Well WWW uses the main thread for some stuff i guess since blocking it will cause issues.

Yes but u can try to use other networking APIs