|
| 1 | +# Release Process |
| 2 | + |
| 3 | +This document outlines the process for creating a new release of the mParticle Apple SDK. |
| 4 | + |
| 5 | +## Automated Release Process |
| 6 | + |
| 7 | +We use GitHub Actions to automate our release process. Follow these steps to create a new release: |
| 8 | + |
| 9 | +### Pre-release Checklist |
| 10 | +- Ensure all commits are in the public main branch |
| 11 | +- Review `sdk-release.yml` in the repo for specific workflow details |
| 12 | +- The release job deploys the most current snapshot of main branch release tag to main branch |
| 13 | + |
| 14 | +## Step 2: Release via GitHub Actions |
| 15 | + |
| 16 | +### What the GitHub Release Job Does |
| 17 | + |
| 18 | +1. **Initial Setup** |
| 19 | + - Verifies job is running from public repo and on main branch |
| 20 | + - Creates temporary `release/{run_number}` branch |
| 21 | + |
| 22 | +2. **Testing Phase** |
| 23 | + - Runs unit tests for iOS and tvOS platforms |
| 24 | + - Validates CocoaPods spec |
| 25 | + - Validates Carthage build |
| 26 | + - Validates Swift Package Manager build |
| 27 | + - Updates kits and runs additional tests |
| 28 | + |
| 29 | +3. **Version Management** |
| 30 | + - Runs semantic version action |
| 31 | + - Automatically bumps version based on commit messages |
| 32 | + - No version bump if no new commits (e.g., feat/fix) |
| 33 | + - Generates release notes automatically |
| 34 | + |
| 35 | +4. **Artifact Publishing** |
| 36 | + - Publishes to package managers: |
| 37 | + - Pushes to CocoaPods trunk |
| 38 | + - Updates Carthage JSON spec |
| 39 | + - Updates Swift Package Manager |
| 40 | + - Creates GitHub release with artifacts |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +### How to Release |
| 45 | + |
| 46 | +1. Navigate to the Actions tab in GitHub |
| 47 | +2. Select "iOS SDK Release" workflow |
| 48 | +3. Run the workflow from main branch with "true" first to perform a dry run |
| 49 | + > 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. |
| 50 | +4. If the dry run succeeds, run the workflow again with "false" option to perform the actual release |
| 51 | + > Note: Only proceed with the actual release after confirming a successful dry run |
| 52 | +
|
| 53 | +### Important Notes |
| 54 | + |
| 55 | +- **Release Duration**: Expect ~30 minutes due to comprehensive test suite across platforms |
| 56 | +- **Platform Requirements**: |
| 57 | + - Tests run on macOS runners |
| 58 | + - Multiple Xcode versions may be tested |
| 59 | + - Both iOS and tvOS platforms are validated |
| 60 | +- **Code Reusability**: |
| 61 | + - Reusable GitHub Actions are defined in the [mparticle-workflows repo](https://github.com/mParticle/mparticle-workflows) |
| 62 | + - This enables other platforms to reuse similar jobs |
| 63 | + |
| 64 | +## Post-Release Verification |
| 65 | + |
| 66 | +After a successful build through GitHub Actions, verify: |
| 67 | +1. Public repo has a new semantic release tag |
| 68 | +2. New version is available on: |
| 69 | + - [CocoaPods](https://cocoapods.org/pods/mParticle-Apple-SDK) |
| 70 | + - [Carthage](https://github.com/mParticle/mparticle-apple-sdk/releases) |
| 71 | + - Swift Package Manager |
| 72 | + |
| 73 | +## Troubleshooting |
| 74 | + |
| 75 | +If you encounter issues during testing, check: |
| 76 | +- Xcode version compatibility |
| 77 | +- Platform-specific test failures (iOS vs tvOS) |
| 78 | +- GitHub Actions logs for specific error messages |
| 79 | +- CocoaPods trunk status |
| 80 | +- Carthage binary framework validation |
0 commit comments