This document outlines the process for releasing the mParticle Android SDK and its kits.
The Android SDK and kits are released using GitHub Actions. The SDK and kits are currently coupled together in the release process.
- Ensure all commits are in the public main branch
- Review
release.ymlin the repo for specific workflow details - The release job deploys the most current snapshot of main branch release tag to main branch
-
Initial Setup
- Verifies job is running from public repo and on main branch
- Creates temporary
release/{run_number}branch
-
Testing Phase
- Runs unit and instrumented tests in parallel
- Instrumented tests require an emulator
- Unit tests run independently
- Updates kits and runs additional tests
- Runs unit and instrumented tests in parallel
-
Version Management
- Runs semantic version action
- Automatically bumps
build.gradleversion based on commit messages - No version bump if no new commits (e.g., feat/fix)
- Generates release notes automatically
- Requires linear history between development and main branches
- Automatically bumps
- Runs semantic version action
-
Artifact Publishing
- Uploads artifacts to Sonatype (core and kits)
- Builds and signs the core SDK and all kit artifacts
- Uploads to Sonatype Nexus (staging area)
- Syncs artifacts to Maven Central
Note: This step will be moved before version bump during semantic release
- Uploads artifacts to Sonatype (core and kits)
-
Branch Synchronization
- Pushes release branch to:
- Public main branch
- Public development branch
- Internal repo main branch
- Deletes release branch on success (preserved on failure for debugging)
- Pushes release branch to:
- Navigate to the Actions tab
- Select "release SDK"
- Run the workflow from main branch with "true" first to perform a dry run
Important: Always start with a dry run to validate the release process. This will perform all steps up to semantic release without actually publishing, helping catch potential issues early.
- If the dry run succeeds, run the workflow again with "false" option to perform the actual release
Note: Only proceed with the actual release after confirming a successful dry run
- Release Duration: Expect ~20 minutes due to comprehensive test suite
- Emulator Issues:
- Sometimes GitHub Actions emulators fail
- We have a custom script to install and start the emulator
scripts/install-start-emulator.sh - OS version is hardcoded to avoid issues with new releases
- Code Reusability:
- Reusable GitHub Actions are defined in the mparticle-workflows repo
- This enables other platforms to reuse similar jobs
After a successful build through GitHub Actions, verify:
- Public repo has a new semantic release tag
- New artifact is present in Sonatype
If you encounter emulator issues during testing, check:
- Emulator setup script
- Current OS version compatibility
- GitHub Actions logs for specific error messages