| title | Enforcing EAS VersionCode Sync and Auto-Increment for Arifa Releases | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| date | 2026-05-02 | ||||||||||||||
| author | pmutua | ||||||||||||||
| tags |
|
||||||||||||||
| commit | 84cc797 | ||||||||||||||
| type | dev-diary |
To ensure seamless releases of the Arifa app, I've implemented two critical changes: enforcing EAS versionCode sync checks before every release and auto-incrementing the EAS versionCode before production builds. These updates are crucial for maintaining a consistent and reliable release process.
Arifa is an AI-powered news aggregation, analysis, and distribution platform for Kenya and Global Tech & Science news. The project utilizes a range of technologies, including React Native, Expo, Astro, Cloudflare Workers, and more. Given the complexity of the project, it's essential to have a robust release process in place.
The first change involves enforcing an EAS versionCode sync check before every release. This check ensures that the versionCode is higher than the latest Play Store upload, preventing duplicate versionCode issues that can lead to Play Store rejections. The check is performed by running npx eas-cli build:version:get --platform android and verifying the returned versionCode.
# ── Pre-Release: EAS Version Sync Check (MANDATORY -- NEVER SKIP) ──
# Play Store REJECTS duplicate versionCodes. This step is NON-NEGOTIABLE.
cd mobile
npx eas-cli build:version:get --platform android
# If returned versionCode ≤ latest Play Store versionCode:
npx eas-cli build:version:set --platform android
# Enter a number HIGHER than the latest Play Store upload.
# Then verify:
npx eas-cli build:version:get --platform android
# Only proceed once versionCode is confirmed higher.
cd ..The second change introduces an auto-increment feature for the EAS versionCode before production builds. This is achieved by adding a step to the CI workflow that increments the versionCode by 1 before building the Android app.
- name: Auto-increment EAS versionCode
if: needs.resolve-env.outputs.is_production == 'true'
run: |
cd mobile
CURRENT=$(eas build:version:get --platform android --json 2>/dev/null | jq -r '.versionCode // "0"')
NEXT=$((CURRENT + 1))
echo "Current versionCode: $CURRENT → bumping to $NEXT"
eas build:version:set --platform android --version "$NEXT"
echo "versionCode set to $NEXT"One of the challenges addressed by these changes is the risk of duplicate versionCode issues, which can result in Play Store rejections. By enforcing a sync check and auto-incrementing the versionCode, we can ensure that each release has a unique and higher versionCode than the previous one.
- The importance of maintaining a consistent and reliable release process for complex projects like Arifa.
- How to use EAS CLI commands to manage versionCode and prevent duplicate versionCode issues.
- The value of automating tasks, such as auto-incrementing versionCode, to reduce manual errors and improve efficiency.
With these changes in place, the Arifa team can focus on delivering high-quality releases without worrying about versionCode issues. The next steps will involve continuing to refine and improve the release process, exploring new features and technologies to enhance the app, and ensuring that the project remains scalable and maintainable.
flowchart TD
A[Release Branch Creation] -->|Check versionCode|> B{VersionCode Check}
B -->|versionCode ≤ latest Play Store versionCode|> C[Increment versionCode]
C -->|versionCode updated|> D[Verify versionCode]
D -->|versionCode confirmed higher|> E[Proceed with Release]
B -->|versionCode > latest Play Store versionCode|> E
E -->|Build Android App|> F[Auto-increment versionCode]
F -->|versionCode incremented|> G[Set versionCode]
G -->|versionCode set|> H[Build and Deploy]
---
## Git Provenance
All commits are SSH-signed (Ed25519) and show a **Verified** badge on GitHub.
The source repository is private — commit URLs are not publicly accessible.
| Commit | Date | Message | Verified |
| ------ | ---- | ------- | -------- |
| `ccb6aae` | 2026-05-02 03:17 +03:00 | docs(root): enforce EAS versionCode sync check before every release | ✓ |
| `f78e24c` | 2026-05-02 03:17 +03:00 | ci(infra): auto-increment EAS versionCode before production builds | ✓ |
| `84cc797` | 2026-05-02 03:22 +03:00 | Merge pull request #26 from pmutua/release/0.10.2 | ✓ |