Transitioning from Microsoft App Center: Exploring GitHub Actions, Jenkins and Fastlane
This article focuses on the journey of finding an alternative solution for app build and deployment automation. It details the decision-making process, challenges faced, and the ultimate solution chosen, without delving into specific code implementations.
Introduction —
When Microsoft announced that Visual Studio App Center is scheduled for retirement on March 31, 2025, it left many developers searching for an alternative solution for automating their app build and deployment processes. So, I started to find out an another alternative for implementing CI/CD that would be both reliable and cost-effective. I wanted a solution that will fulfil my following requirements —
- I can manually trigger the app build and deployment process instead of having it automatically triggered by events such as code pushes to a specific branch or the creation of pull requests etc.
- I don’t want to use a MAC for this. Allocating a Mac machine would not be a cost-effective solution.
- Before starting the process, I can incorporate inputs such as modifying environment variables in my code, specifying the platform for the build (Android or iOS), or triggering builds for staging and production environments separately.
Exploring Jenkins —
Jenkins is a popular open source automation server for building and deploying softwares. When I started to explore it, I found that it was best for all my requirements, but only issue was that I wanted to use a linux machine for this and building iOS apps in not possible on linux machines. So for android, I can use this but for iOS I need to find an another solution.
Exploring CircleCI —
CircleCI is also a popular CI/CD tool. I agreed to use it for building my iOS app since it will provide it’s own virtual machine, until I found out that I cannot trigger manual builds from this, which was one of my primary requirements.
Exploring Xcode Cloud —
Xcode cloud was great for building and deploying iOS apps, but again, it does not support api, which I can hit from jenkins job to start building my app whenever I want. So, I still need to find an another alternative to build my iOS app.
Adopting Github Actions —
After I explored github actions, I found out that it was best suited for all my primary requirements. I can trigger build process manually, passing some input options using it’s api, that can be integrated inside Jenkin’s job to trigger the iOS build and deployment process.
On the way of executing the plan —
I can now start to create a job in Jenkins for automatic build and deployment process of my android and iOS apps, but another challenge I faced was that it was kind of complex to write code manually for deployment processes. I need to handle so much things for both platforms such as handling some specific apis and their responses for uploading process. For iOS, I also need to manage the certificates, provisioning profiles and private keys. So, I started to explore if I can avoid handling so much things all by myself and guess what, I found Fastlane, an open source platform for simplifying app’s deployment processes. It can handle the deployment process all by itself, just I need to write and execute some simple script for this.
Where To Upload Builds —
For both android and iOS, I need to deploy staging and production builds. So, for staging, I consider 2 options, either to use firebase app distribution for both platforms or to use internal testing track in Google play console for android, and testflight for iOS. So, after comparing both options, I choose firebase app distribution for android because it was easy to share and test builds using this and testflight for iOS because for firebase I need to create iOS build using adhoc profile and need to add tester’s udid in apple app store connect, but for testflight, I just need to add tester’s email.
The Plan —
Since I already installed necessary things for building android and iOS apps such as JAVA, android command line tools or android studio for android app, Xcode for iOS app, react native or flutter sdk for building cross platform’s apps, I started to setup the following things —
- Jenkins server on my machine.
- Fastlane
- Firebase cli, for distributing apps using firebase app distribution.
After setting up above things, I started to execute my plan as follows —
- I wrote a script that can be executed in my jenkins job to build and deploy apps. In this, I added the code to get the parameterized variable’s value that can be used to determine which platform’s build to execute (android or iOS) and for which flavor, build needs to be deployed (staging or production).
- Then, I setup fastlane for both platforms by adding Fastfile, Appfile and Matchfile in both android and iOS directories.
- After that, for iOS, I added .github/workflows/main.yml file in my project, that contains code for iOS app build and deployment. This file will be used by github actions api to build and deploy ios app. Basically this file contains steps that choose which mac machine to be used for building iOS app, setting up the xcode, configuring react native or flutter (for cross platform apps), take some custom enviroment variables, and execute a custom script that can handle ios app build and deployment. For the custom script, I used fastlane for building and deploying the iOS app.
Then, I modified my jenkins script specified in step 1, and added commands for building android app and then added fastlane command to deploy my android app. For iOS, I added the command to execute github action’s api that can trigger the manual workflow on github on the basis of main.yml file specified in previous step passing some custom env variables.
Useful Links —
- Installing Jenkins — https://www.jenkins.io/doc/book/installing/linux/#debianubuntu
- Github Actions Api — https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event
- Fastlane — https://docs.fastlane.tools/
- Fastlane match (To handle iOS certificates, profiles and private keys) — https://docs.fastlane.tools/actions/match/
- Firebase CLI — https://firebase.google.com/docs/cli#install-cli-mac-linux
- Firebase android app distribution — https://firebase.google.com/docs/app-distribution/android/distribute-cli?apptype=apk#step_2_distribute_your_app_to_testers
Enjoyed this article? Have thoughts or questions about app build automation?
Follow me on LinkedIn for more insights and updates, and leave a comment below — I’d love to hear from you! If you found this article helpful, give it a round of applause and share it with your colleagues to spread the knowledge.