Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Git Tutorial
  • Git Exercises
  • Git Basic Commands
  • Git Cheat Sheet
  • Git Interview Questions
  • Git Bash
  • GitHub
  • Git Branch
  • Git Merge
  • Git WorkFlow
  • Git Hooks
  • Git LFS
  • Git Rebase
  • Git Cherry Pick
Open In App
Next Article:
How to Upload Android APK to Testers Group in Firebase Using GitHub Actions?
Next article icon

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

Last Updated : 14 Feb, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

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/[email protected]       - name: Setup JDK         uses: actions/[email protected]         with:           distribution: temurin           java-version: '11'       - name: build release         run: bash ./gradlew assembleDebug       - name: upload artifact to Firebase App Distribution         uses: wzieba/[email protected]         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.


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

I

itsnitish22
Improve
Article Tags :
  • Git
  • Android
  • Geeks Premier League
  • Firebase
  • GitHub
  • Geeks-Premier-League-2022

Similar Reads

    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
    3 min read
    How to Create a New Branch on GitHub using Android Studio?
    Creating a new branch on GitHub using Android Studio can help your development workflow by allowing you to work on new features or fixes without affecting the main codebase. In this article, we will walk you through the steps to create a new branch directly from Android Studio and push it to your Gi
    2 min read
    How to Create a Pull Request on GitHub using Android Studio?
    Creating a pull request is an important part of collaborating on projects hosted on GitHub. It allows you to propose changes to a repository, enabling others to review, discuss, and merge your changes. Here’s a step-by-step guide on how to create a pull request on GitHub using Android Studio. Steps
    2 min read
    Android: How to Upload an image on Firebase storage?
    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 Firebase application. This article explains how to build an Android application with the ability to
    6 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 bui
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences