I want to automate my Android build process so that the APK generated during the pipeline is uploaded directly to the Bitbucket Downloads section. The APK file is in a folder that is included in gitignore since it is created during the build.
Is there a clean and reliable way to make Bitbucket Pipelines generate the APK and push it to Downloads automatically after each build or on specific branches like main or release?
Any step by step guidance or example configuration would be very helpful.