Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to deploy generated APK to Bitbucket Downloads using Pipelines?

Kassy Shane
Contributor
October 5, 2025

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.

7 answers

1 accepted

1 vote
Answer accepted
Zoya Khan
October 12, 2025

You can make Bitbucket Pipelines build your APK and upload it to the Downloads section automatically. First, let the pipeline build the APK using Gradle and save it as an artifact. Then add a second step to upload the file. The easiest way is to use the official bitbucket-upload-file pipe. In your bitbucket-pipelines.yml, build the APK in the first step and in the next step use the pipe to upload app/build/outputs/apk/release/app-release.apk to Downloads. If you prefer, you can also use curl with an App Password to upload it through Bitbucket’s API. Just store your username and app password as secure variables, then post the file to the Downloads endpoint. This way, every time you push to main or release, the APK will be built and uploaded automatically.

Kassy Shane
Contributor
October 12, 2025

Great answer, Zoya. Using the bitbucket-upload-file pipe with separate build and upload steps is a clean, maintainable approach. Secure variables for API authentication are definitely best practice. I’ve also shared helpful versioning and release resources on my website for teams looking to streamline their deployment process.

Like Zoya Khan likes this
Zoya Khan
October 12, 2025

thanks kassy! i am glad that my answer helped you :)

Kassy Shane
Contributor
October 12, 2025

welcome

0 votes
Shahzad Ali
July 30, 2026

If you enjoy discovering fresh online video content, this platform offers an easy way to explore a wide range of entertainment options. You can visit https://taboootube.com/ to browse trending videos, discover new creators, and stay updated with the latest digital content in one convenient place.

 

0 votes
Shahzad Ali
July 30, 2026

If you enjoy anime and are always looking for something new to watch, this platform is a great place to explore a wide variety of anime content. You can visit https://tomatosanimesapk.com.br/ to discover popular series, explore trending titles, and stay updated with the latest anime releases in one convenient place.

0 votes
Shahzad Ali
July 30, 2026

Whether you're an anime fan or just looking for something new to watch, this platform makes it easy to explore anime-related content and discover popular titles. You can check it out at https://senpastream.fr/ to browse different series, stay updated with new releases, and enjoy a smooth viewing experience.

0 votes
Shahzad Ali
July 29, 2026

For students and general users who need help with everyday math tasks, this online resource provides a convenient way to work through common calculations. Users can access useful calculation support at https://thecalculadoraalicia.org/ and use it to check results more efficiently.

0 votes
John frances
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 22, 2026

I agree that separating the build and upload stages is usually the cleanest approach. Using artifacts between pipeline steps makes the process much easier to maintain, especially when working with release builds and multiple deployment targets.

For Android projects, it’s also useful to keep clear documentation for APK generation, signing, and installation workflows. I often refer developers to an Android APK installation guide when troubleshooting build outputs, deployment paths, or release package issues because small configuration mistakes can easily break the process.

Overall, Bitbucket Pipelines provides a reliable way to automate APK creation and distribution once the workflow is properly configured.

0 votes
John smith
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2026

Yeah, this setup is actually pretty solid 👍 — Bitbucket Pipelines makes APK automation much easier once it’s configured properly.

I’ve used a similar flow where the APK is generated using assembleRelease, then automatically uploaded after the build completes. Since everything runs inside the pipeline, it doesn’t matter that the APK is in .gitignore.

One thing that helped me a lot while working with these kinds of builds is having a simple reference guide for Android APK build + deployment issues (especially Gradle output paths, signing, and pipeline variables). I’ve shared a basic walkthrough here for anyone who gets stuck during setup — busimulaterindonesia.com

It really helps when you’re dealing with CI/CD for the first time or debugging why the APK isn’t getting generated or uploaded correctly.

 

Kylen Avers
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 12, 2026

You can automate this with Bitbucket Pipelines by building the APK first, saving it as a pipeline artifact, and then using the Bitbucket Downloads API to upload it after a successful build. This works even if the APK directory is listed in .gitignore because the file is generated during the pipeline, not committed to the repository. It's also a good idea to trigger the upload only for main or release branches to avoid unnecessary builds. You can also check here for more insights on mobile app workflows, build automation, and deployment strategies.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events