If you’re using BitBucket for hosting your repo remotely , one common thing you might have done would be to upload the artifacts(apk , jar etc which are outputs of your build process) manually using BB’s web interface .
It can be done via terminal also . BB exposes an API for that. Find it here .
I’m developing an android app and after each build I wanna upload my app-debug.apk generated to Downloads section so that QA team can do their testing .
I put this command in a file called upload.
curl -v -u charany1 -X POST https://api.bitbucket.org/2.0/repositories/my_team_name/repo_name/downloads -F files=@app/build/outputs/apk/app-debug.apk
Make it executable .
chmod +x upload
Now , you can execute it after every build from terminal itself.