The Wayback Machine - https://web.archive.org/web/20240927183439/https://www.geeksforgeeks.org/how-to-upload-android-apk-to-testers-group-in-firebase-using-github-actions/
Open In App

How to Upload Android APK to Testers Group in Firebase Using GitHub Actions?

Last Updated : 14 Feb, 2022
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Testing is always required whenever we build an app to ensure it functions properly in production. It might be time-consuming and inconvenient to send the application to the testers every time new code is merged into the codebase. So to solve this problem, CD pipelines can be used to deliver the software to the testers. In this article, we’ll be learning to build a CD pipeline for Android and send the APK to the testers group in Firebase.

Pre-requisites: Git, Github, Basic understanding of building CI/CD pipelines and GitHub Actions, Setup of Firebase.

Now as we know how to set up Firebase and have generated the TokenID, keep it safe as we’ll need the same TokenID while we’ll code our CD pipeline. So first of all go to Firebase and create a new project. Write the name of the project as you wish. Now follow the guidelines of setting up firebase in your android project. After you have added Firebase to your Android project, go to the Firebase Console, select your project, and scroll to the bottom of the console. Now click on See all Extension features. In Release and Monitor section, click on App Distribution -> Testers & Groups -> Add group. Name the group as “project-testers” and add your email id to it. 

After that go back to the settings of your project and copy the AppID. Keep it safe, we will be using that too in our code. 

Now, we can create our CD pipeline using GitHub actions and upload our APK to the testers group that we created in Firebase. Create a .yml file named releases.yml in .github/workflows directory under the project’s root directory. Start writing the below code in that file.

name: Build and Release
'on':
 push:
   branches:
     - master
   tags:
     - v*
jobs:
 build:
   name: Upload APK to App Tester
   runs-on: ubuntu-latest
   steps:
     - uses: actions/checkout@v2.4.0
     - name: Setup JDK
       uses: actions/setup-java@v2.5.0
       with:
         distribution: temurin
         java-version: '11'
     - name: build release
       run: bash ./gradlew assembleDebug
     - name: upload artifact to Firebase App Distribution
       uses: wzieba/Firebase-Distribution-Github-Action@v1.2.2
       with:
         appId: 'Enter you AppID here'
         token:  'Enteer your TokenID here'
         groups: project-testers
         file: app/build/outputs/apk/debug/app-debug.apk

Whenever there will be a push of code in the master branch, this workflow will be triggered. It will then set up JDK and build that APK for release. After this is done, it will upload the file app/build/outputs/apk/debug/app-debug.apk to the project-testers group that we created in Firebase. Now commit this code, and you will see the workflow running in the Actions tab of your project on GitHub. 

After the workflow run is finished, go to the releases tab of your project in firebase and you’ll see a release published over there.

In this way, the testers can download the app from there and can test it. Each time new code is pushed into the master branch, this workflow will trigger, and upload the APK for testing.



Similar Reads

Flutter - Building and Releasing APK using GitHub Actions
Github Actions is a Github tool that allows users to create CI/CD pipelines directly in a Github project instead of going to a third-party website. It assists us in developing, testing, and releasing our project very conveniently. In this article, we're going to build a workflow for our flutter project. We'll first build the project using the workf
3 min read
How to Upload a Project through GitHub Desktop on GitHub
GitHub Desktop is a user-friendly application that simplifies the process of managing your GitHub repositories on your local machine. If you’re looking to upload a project to GitHub using GitHub Desktop, this guide will walk you through the steps, making the process straightforward and accessible even for beginners. What is GitHub Desktop?GitHub De
3 min read
How to Setup Firebase Local Emulators for using Firebase Console and All Firebase Services?
Firebase Emulators are used to test our projects on the local firebase server (Emulator). It provides all the services of the Firebase Console. It is most useful for firebase functions because to use firebase functions we have to take the Blaze plan of firebase means we must have a credit card, here is a solution to this problem we can test our mob
4 min read
Basic CI Workflow For Android using GitHub Actions
Continuous integration (CI) is a software development process in which the team members can integrate their work. For Android developers, setting up a CI pipeline can greatly enhance productivity and code quality. GitHub Actions, a powerful automation tool integrated into GitHub, provides an excellent platform for creating a CI workflow for Android
2 min read
Automated Release for Android Using GitHub Actions
Automating the release process for Android applications can significantly enhance efficiency, reduce manual errors, and ensure consistent delivery. GitHub Actions provides a powerful platform to automate workflows directly from your GitHub repository. This article will guide you through setting up an automated release pipeline for Android using Git
3 min read
Github Actions For Android
GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. CI/CD methodology provides speed, accuracy, and reliability. It increases the release rates by detecting the failures faster. Android is a widely used mobile operating system and developing apps
3 min read
Different Ways to Analyze APK Size of an Android App in Android Studio
APK size is one of the most important when we are uploading our app to Google Play. APK size must be considered to be as small as possible so users can visit our app and download our app without wasting so much data. In this article, we will take a look at How we can analyze our APK in Android Studio to check the APK size. Android Studio itself pro
3 min read
How to Upload a Video in Firebase Database using Android Studio?
Firebase is a mobile and web application development platform. It provides services that a web application or mobile application might require. Firebase provides secure file uploads and downloads for the Firebase application. This article explains how to build an Android application with the ability to select a video from the mobile gallery and upl
3 min read
How to Publish Docker Image to Dockerhub Using Github Actions?
Pre-requisites: GitHub Actions, Docker Hub Publishing Docker images to Docker Hub using GitHub Actions is a simple and efficient process that can automate your image-building and publishing process. What are Github Actions?GitHub Actions is a CI/CD (Continuous Integration/Continuous Deployment) platform integrated with GitHub. It enables developers
3 min read
Spring Boot - Continuous Integration Using GitHub Actions
Let's say we have two or more developers who are merging code into a single repository. There can be issues in merging code from different developers. So the Continuous Integration tools help in solving not just that but many other things like: Run an automated build after successful merging (like build, test code coverage, etc.).We can also automa
3 min read
How to Set Up a CI Pipeline for Ktor Using GitHub Actions?
In this article, we'll look at how to use GitHub Actions to create a robust and effective Continuous Integration (CI) pipeline for Ktor applications. Developers have a great foundation to construct high-performance server-side apps thanks to Ktor, a versatile and lightweight Kotlin framework for building web applications. We can automate the build,
6 min read
How to Upload Excel Sheet Data to Firebase Realtime Database in Android?
Firebase Realtime Database is the backend service which is provided by Google for handling backend tasks for your Android apps, IOS apps as well as your websites. It provides so many services such as storage, database, and many more. The feature for which Firebase is famous for its Firebase Realtime Database. By using Firebase Realtime Database in
6 min read
How to Upload PDF Files in Firebase Storage in Android?
Firebase is a mobile and web application development platform. It provides services that a web application or mobile application might require. Firebase provides secure file uploads and downloads for the Firebase application. This article explains how to build an Android application with the ability to select the pdf from the mobile phone and uploa
3 min read
Android - Upload an Image on Firebase Storage with Kotlin
Firebase Cloud Storage stores files in the Google Cloud Storage bucket and makes them accessible through both Firebase and Google Cloud. It allows us to upload and download files from mobile clients through the Firebase SDKs, and perform server-side processing such as image filtering or video transcoding using the Google Cloud Platform. In this art
6 min read
How to Upload Project on GitHub from Android Studio?
Uploading your project to GitHub directly from Android Studio simplifies your development workflow and helps you share your code with others easily. Here’s a step-by-step guide on how to upload your project on GitHub from Android Studio. Steps to Upload Project on GitHub from Android StudioStep 1: Go to VCS panel which is present at the top of Andr
2 min read
How to Update User's Profile After Signing Through GitHub using Firebase in Android?
In this article, we will learn to update user's profiles who signed in to the app through GitHub. The profile will be updated through the user's GitHub information like GitHub Id, name, followers, following, etc. Let's start! Step 1: First set up your app so that users can be signed in through GitHub. So you need to authenticate the user using GitH
7 min read
Introduction to GitHub Actions
GitHub Actions is a CI/CD (Continuous Integration/ Continuous Deployment) platform for automating the builds, test, and deployment process. Using GitHub actions, we can build and test every pull request in the repository using workflows, or push the merged pull requests to production with workflows. GitHub Actions allows you to conduct processes in
4 min read
Deploy MERN Stack on AWS EC2 with Docker via GitHub Actions
EC2 stands for Elastic Cloud Computing and is a service that AWS offers for running applications, hosting websites, processing data, and performing other computing operations. How will we deploy our MERN application?We will push our MERN project frontend and backend into two different repositories on GitHub from our local machine. After that, using
15+ min read
How To Set Up Merge Queues in GitHub Actions?
Managing multiple pull requests (PRs) efficiently is important in a collaborative development environment. Merge queues help automate and control the merging of PRs in sequential order, ensuring that only PRs that pass all checks are merged into the main branch. In this article, we will discuss how to set up merge queues using GitHub Actions. Table
4 min read
The Matrix Strategy in GitHub Actions
GitHub Actions provides a platform for automating your CI/CD pipelines, allowing you to run workflows directly from your GitHub repositories. One of the most powerful features of GitHub Actions is the matrix strategy, which allows to run a single job in multiple configurations. This can include different operating systems, language versions, enviro
5 min read
REST API Endpoints For GitHub Actions Variables
GitHub Actions is used to automate workflows, build, test, and deploy code. To make workflows more dynamic and secure, GitHub Actions allows you to use variables, which can store data like configuration values, secrets, or other necessary information. GitHub exposes a REST API to manage these variables efficiently, providing developers with full co
5 min read
GitHub Actions
GitHub Actions is a powerful CI/CD (Continuous Integration/Continuous Deployment) tool integrated directly into GitHub. It allows developers to automate, customize, and execute workflows in their repositories. With GitHub Actions, you can automate software development processes, from testing and building to deployment and monitoring. In this articl
5 min read
How to Generate Signed Apk in Android Studio?
Signed Apk generates a key and this key can be used to release versions of the app, so it is important to save this key which will be used when the next version of the app is released. The Android system needs that all installed applications be digitally signed with a certificate whose private key is owned by the application's developer. The Androi
3 min read
How to Reduce APK Size in Android?
APK size is one of the most important factors while building any app for any organization or any business. No user would like to install a very large APK and consume his data on downloading that APK. The APK size will make an impact on your app performance about How fast it loads, How much memory it consumes, and How much memory it uses. It is very
7 min read
How to Generate Unsigned (Shareable) Apk in Android Studio?
Unsigned Apk, as the name suggests it means it is not signed by any Keystore. A Keystore is basically a binary file that contains a set of private keys. Every App that we install using the Google Play App Store needs to be signed with a Keystore. The signed apk is simply the unsigned apk that has been signed via the JDK jarsigner tool. If you want
2 min read
How to use R8 to Reduce APK Size in Android?
If you are building any apps and you want to target this app to a large audience then there are so many factors which you should consider while building your apps. The most important factor while building any application is its size. The size of the app matters a lot. If your app size is very high then users don't like to download such big apps tha
6 min read
How to Use Proguard to Reduce APK Size in Android?
App size matters a lot when building any application. If the app size is larger most of the users will not download your app due to its huge size. The large app size will cost your user huge data and he will also require disk space to install your application. So to reduce the size of APK proguard is one of the important java tools which is used to
6 min read
Different Ways to fix "DELETE_FAILED_INTERNAL_ERROR" Error while Installing APK in Android Studio
In Android Studio when building a new APK or while installing an application from Android Studio. You will get to see errors as shown in the title such as "DELETE FAILED INTERNAL ERROR". This error is generally due to conflicts in the APK version while installing a new Android app. This is how the error dialog pops up on the screen Failure: Install
4 min read
How to Change the Default Generated apk Name in Android Studio?
While developing any Android app using Android Studio we generate our APK file after creating our whole Android application. We use this .apk file to publish it to our Google Play console or on any other platform. When we are generating our .apk file for release apk. We always see our apk file name starts with the release.apk file. In this article,
6 min read
Different Ways to fix "The APK file does not exist on disk" in Android Studio
Whenever we try to debug the application on Android Studio we encounter the error “The APK file does not exist on disk” in the Android Studio. The MainActivity Page throws the error as: The APK file /Users/MyApplicationName/app/build/outputs/apk/app-debug.apk does not exist on disk. So, In this article, we will discuss 4 different methods for fixin
3 min read