11 KiB
Meshtastic-Android Release Process
This document outlines the steps for releasing a new version of the Meshtastic-Android application. Adhering to this process ensures consistency and helps manage the release lifecycle from initial testing to production deployment, leveraging automation via the release.yml GitHub Action for builds and initial GitHub Release drafting.
Note: The release.yml GitHub Action is manually triggered. It builds artifacts and, if its create_github_release parameter is true (default), creates a Git tag and a draft pre-release on GitHub. Finalizing and publishing the GitHub Release, as well as uploads to the Google Play Console, are manual steps.
Prerequisites
Before initiating the release process, ensure the following are completed:
- Main Branch Stability: The
mainbranch must be stable, with all features and bug fixes intended for the release merged and thoroughly tested. - Automated Testing: All automated tests (unit, integration, UI) must be passing on the release candidate code, CI must be passing. No explicit tests will be run on the
release.ymlGithub Action. - Version Update:
- Update
VERSION_NAME_BASEin thebuildSrc/src/main/kotlin/Configs.ktfile according to Semantic Versioning (e.g.,X.X.X). This value will be used for the Git tag (e.g.,vX.X.X) and the GitHub Release name. This update should be done on the release branch.
- Update
- Final Checks: Perform thorough manual testing of critical user flows and new features on various devices and Android versions.
Release Steps
The release process is divided into distinct phases. The release.yml GitHub Action is triggered manually for each phase that requires a build and GitHub Release object.
Phase 1: Closed Alpha Release (Closed Testing)
This phase involves creating a release candidate and deploying it to a limited audience for initial feedback.
-
Create Release Branch:
- From the latest commit of the
mainbranch, create a new branch namedrelease/x.x.x(e.g.,release/1.2.3).# Ensure you are on the latest main branch git checkout main git pull origin main # Create the release branch git checkout -b release/x.x.x - Update
VERSION_NAME_BASEinbuildSrc/src/main/kotlin/Configs.kton this branch (e.g., to1.2.3). - Commit and push the release branch:
git add buildSrc/src/main/kotlin/Configs.kt git commit -m "Set version for release 1.2.3" git push origin release/x.x.x
- From the latest commit of the
-
Draft Pull Request (PR):
- On GitHub, create a draft Pull Request from the
release/x.x.xbranch targeting themainbranch. - Set the PR title to
Release x.x.x(e.g.,Release 1.2.3). - In the PR description, summarize the key changes. This can serve as a basis for the release notes.
- On GitHub, create a draft Pull Request from the
-
Initiate Closed Alpha Build and Draft Release via
release.yml:- Manually trigger the
release.ymlGitHub Action (e.g., through the GitHub Actions UI).- Set the
branchinput to yourrelease/x.x.xbranch. - Set the
create_github_releaseinput tofalse. This prevents the action from creating a GitHub Release at this stage to keep visibility low during Closed Alpha testing.
- Set the
- The
release.ymlGitHub Action will:- Build signed release APK (F-Droid) and Android App Bundle/APK (Google) from the
release/x.x.xbranch.\
- Build signed release APK (F-Droid) and Android App Bundle/APK (Google) from the
- Manually trigger the
-
Manual Closed Alpha Deployment to Google Play:
- Download the AAB from the assets created during the previous step.
- Manually upload this AAB to a Closed Test Channel in the Google Play Console.
-
Monitor Feedback: Actively collect feedback from closed testers. Address any critical bugs by committing fixes to the
release/x.x.xbranch and pushing them.- For re-deployment: Manually re-trigger the
release.ymlGitHub Action as in step 3. Note: This will attempt to create the same tag. If the tag already exists, the GitHub Release creation might behave unexpectedly or require manual intervention (e.g., deleting the old tag and release before re-running, or the action might update the existing draft release ifactions/create-release@v1is configured to do so – verify its behavior with existing tags). Then, manually upload the new AAB to the Closed Test Channel. Consider ifVERSION_NAME_BASEneeds a patch increment for subsequent Closed Alpha builds if distinct tags are desired.
- For re-deployment: Manually re-trigger the
Note on Promoting Builds: If the Closed Alpha testing phase was successful and no code changes (and thus no re-builds) were required, the AAB uploaded to the Closed Test Channel during step 4 can often be directly promoted to the Open Test Channel (Open Alpha) in the Google Play Console. If changes were made, proceed with a new build for Open Alpha as described below.
Phase 2: Open Alpha Release (Open Testing)
Once the Closed Alpha release is stable and initial feedback is addressed, the release is promoted to a wider audience.
-
Promote Pull Request:
- Change the status of the
Release x.x.xPR from "Draft" to "Ready for Review". - Incorporate any feedback from code reviews into the
release/x.x.xbranch and push the changes.
- Change the status of the
-
Initiate Open Alpha Build and Draft Release via
release.yml:- Ensure the
release/x.x.xbranch contains all fixes andVERSION_NAME_BASEinConfigs.ktreflects the intended version for this Open Alpha. - Manually trigger the
release.ymlGitHub Action as in Closed Alpha Phase (Step 3), ensuringbranchpoints torelease/x.x.x. - The
release.ymlGitHub Action will perform the same steps: build, tag (e.g.,vX.X.X), and create/update a draft pre-release on GitHub titled "Meshtastic Android X.X.X (versionCode) alpha".
- Ensure the
-
Finalize GitHub Release (Manual):
- Navigate to the draft pre-release created by the GitHub Action.
- Edit the release:
- Change the title to reflect a production release (e.g., "Meshtastic Android X.X.X (versionCode) beta").
- Check "This is a pre-release".
- (Re)generate release notes from the previous beta tag, the notes will be generated based on the template:
.github/release.yml. - Publish the release (making it no longer a draft). This makes the alpha release and artifacts visible to the public and available for download via GitHub or third parties like Fdroid and Obtainium.
-
Manual Open Alpha Deployment to Google Play:
- Download the AAB from the GitHub draft pre-release.
- Manually upload this AAB to the Open Test Channel (Alpha) in the Google Play Console.
-
Monitor Feedback: Continue to monitor feedback. Address critical issues by committing fixes to
release/x.x.x. For re-deployment, repeat step 2 and 3 of this Open Alpha phase.
Note on Promoting Builds: If the Open Alpha testing phase was successful and no code changes (and thus no re-builds) were required beyond those already incorporated for this Open Alpha build, the AAB uploaded to the Open Test Channel (Alpha) during step 3 can often be directly promoted to the Production Channel in the Google Play Console. If changes were made, ensure all final changes are on the main branch before proceeding with the Production build as described below.
Phase 3: Production Release
After successful Open Alpha testing and when the release candidate is considered stable.
-
Final Review and Merge Pull Request:
- Conduct a final review of the
Release x.x.xPR. - Ensure
VERSION_NAME_BASEinConfigs.kton therelease/x.x.xbranch is the correct final version (e.g.,1.2.3). - Once approved, merge the
release/x.x.xPR into themainbranch.
- Conduct a final review of the
-
Initiate Production Build and Draft GitHub Release via
release.yml:- Manually trigger the
release.ymlGitHub Action:- Set the
branchinput tomain. - Ensure
create_github_releaseinput istrue.
- Set the
- The
release.ymlGitHub Action will:- Build artifacts from the latest commit on the
mainbranch (which now includes the merged release changes and correctVERSION_NAME_BASE). - Create the final Git tag (e.g.,
v1.2.3) on the merge commit onmain. - Create/Update a draft pre-release on GitHub titled "Meshtastic Android X.X.X (versionCode) alpha" associated with this tag.
- Attach the F-Droid/universal APK and Android App Bundle (AAB) to this draft pre-release. The AAB is suitable for Google Play Console uploads.
- Build artifacts from the latest commit on the
- Manually trigger the
-
Finalize GitHub Release (Manual):
- Navigate to the draft pre-release created by the GitHub Action.
- Edit the release:
- Change the title to reflect a production release (e.g., "Meshtastic Android X.X.X (versionCode) beta").
- Uncheck "This is a pre-release".
- (Re)generate release notes from the previous beta tag, the notes will be generated based on the template:
.github/release.yml. - Publish the release (making it no longer a draft). This makes the beta(production) release visible to the public and available for download via GitHub or third parties like Fdroid and Obtainium.
-
Manual Production Deployment to Google Play:
- Download the AAB from the now-finalized GitHub Release assets.
- Manually upload this AAB to the Production Channel in the Google Play Console, ideally using a staged rollout.
Post-Release Activities
- Monitoring: Closely monitor app performance (e.g., using Datadog), crash reports (e.g., using Firebase Crashlytics), and user feedback.
- Communication: Announce the new release to the user community.
- Hotfixes: If critical bugs are discovered:
- Create a hotfix branch (e.g.,
hotfix/x.x.y) from the production tag onmainor directly frommain. - Implement and test the fix. Update
VERSION_NAME_BASEinbuildSrc/src/main/kotlin/Configs.ktfor the patch version (e.g.,1.2.4). - Merge the hotfix into
main(and cherry-pick to any active release branches if necessary). - Manually trigger the
release.ymlGitHub Action, setting thebranchtomain(or your hotfix branch if building before merge). - The action will build, create a new tag (e.g.,
v1.2.4), and create a new draft pre-release ("...alpha"). - Manually finalize this GitHub release as in "Phase 3: Production Release - Step 3" (update title, uncheck pre-release/draft, add notes, publish).
- Manually upload the generated AAB to the necessary Play Console tracks.
- Create a hotfix branch (e.g.,
- Retrospective (Optional): Conduct a team retrospective.