Commit 1123f5f
ci(example): inject versionCode from github.run_number
Prevents collision with the versionCode=1 AAB that was uploaded manually
to the Play Store internal track to prove package name ownership. Play
rejects duplicate versionCodes per package, so the next CI upload would
fail without this.
github.run_number is monotonic per-workflow-per-repo, so successive CI
publishes will always produce a strictly-increasing versionCode. The
static `versionCode 1` in build.gradle stays as the local dev default;
AGP's `android.injected.version.code` property wins when set.
Known limitation (same as sibling TestFlight workflow): manual uploads
that bump the versionCode outside of CI can get ahead of run_number,
which would then fail as "not greater than previously uploaded build".
Fix if/when it happens by re-triggering CI enough times to overtake,
or add a large offset to run_number.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1ae6097 commit 1123f5f
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| 99 | + | |
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| |||
0 commit comments