zzThis 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, leveraging automation via the `release.yml` GitHub Action.
**Note on Automation:** The `release.yml` GitHub Action is primarily triggered by **pushing a Git tag** matching the pattern `v*` (e.g., `v1.2.3`, `v1.2.3-open.1`). It can also be manually triggered via `workflow_dispatch` from the GitHub Actions UI (select the desired branch/tag/commit).
* Builds F-Droid (APK) and Google (AAB, APK) artifacts. If artifacts for the same commit SHA have been built before, it will use the cached artifacts instead of rebuilding.
1.**Main Branch Stability:** The `main` branch (or your chosen release branch) must be stable, with all features and bug fixes intended for the release merged and thoroughly tested.
2.**Automated Testing:** All automated tests (unit, integration, UI) must be passing on the release candidate code, and CI checks on pull requests must be green.
3.**Versioning and Tagging Strategy:**
* The primary source for the release version name in the CI workflow is the Git tag (e.g., `v1.2.3` results in version name `1.2.3`).
* Tags **must** start with `v` and generally follow Semantic Versioning (e.g., `vX.X.X`).
* For pre-releases, use suffixes that the workflow recognizes to set the GitHub pre-release flag and Play Store track:
***Production releases** use no suffix (e.g., `vX.X.X`). The `Y` in suffixes is an increment for iterations of the same pre-release type.
***Recommendation:** Before tagging, update `VERSION_NAME_BASE` in `buildSrc/src/main/kotlin/Configs.kt` to match the `X.X.X` part of your tag. This ensures consistency if the app uses this value internally. The CI workflow derives `APP_VERSION_NAME` directly from the tag and passes it to Gradle.
The primary way to initiate a release is by creating and pushing a tag:
1.**Ensure Local Branch is Synced:**
```bash
# Example: if releasing from main
git checkout main
git pull origin main
```
2.**Create and Push Tag:**
Tag the commit you intend to release (e.g., the head of `main` or a release branch).
```bash
# Example for an open beta release
git tag v1.2.3-open.1
git push origin v1.2.3-open.1
```
Or, for a production release:
```bash
git tag v1.2.3
git push origin v1.2.3
```
Pushing the tag automatically triggers the `release.yml` GitHub Action, which performs the automated steps listed in the "Note on Automation" section at the beginning of this document.
## Managing Different Release Phases (Manual Steps Post-Workflow)
After the `release.yml` workflow completes, manual actions are needed on GitHub and in the Google Play Console.
1.**Monitoring:** Closely monitor app performance, crash reports, and user feedback.
2.**Communication:** Announce the new release to the user community as appropriate.
3.**Hotfixes (for Production Releases):**
* If a critical bug is found in a production release:
1. Create a hotfix branch (e.g., `hotfix/x.x.y`) from `main` (or directly from the production tag `vX.X.X`).
2. Implement and test the fix.
3. Update `VERSION_NAME_BASE` in `buildSrc/src/main/kotlin/Configs.kt` for the patch version (e.g., `1.2.4`).
4. Merge the hotfix branch into `main`.
5. Tag the merge commit on `main` with the new patch version (e.g., `v1.2.4`).
6. Push the new tag (e.g., `git push origin v1.2.4`). This triggers the `release.yml` workflow.
7. Follow the **Manual Steps Post-Workflow** for a **Production Release** (uncheck "pre-release" on GitHub, manage production track draft in Play Console).