ci(play): offset versionCode by +100 to skip collision at 31 (#34)

Run 31 collided with a prior manual upload at versionCode 31. Add a
+100 offset so the next workflow run uploads at versionCode 132 and
all subsequent runs continue monotonically past historical conflicts.

Refs #32
This commit is contained in:
Den
2026-06-21 22:54:14 -07:00
committed by GitHub
parent ae124d7311
commit e6fbd0f608

View File

@@ -77,9 +77,11 @@ jobs:
- name: Bump android.versionCode in app.json
# Play Store rejects duplicate versionCodes, so derive a monotonic value
# from github.run_number. expo prebuild reads this into build.gradle.
# from github.run_number + offset. expo prebuild reads this into build.gradle.
# Offset 100 skips past historical collisions (run 31 collided with a
# manual upload at versionCode 31). Next run = run_number + 100.
run: |
node -e "const f='app.json';const j=require('./'+f);j.expo.android=j.expo.android||{};j.expo.android.versionCode=${{ github.run_number }};require('fs').writeFileSync(f,JSON.stringify(j,null,2)+'\n')"
node -e "const f='app.json';const j=require('./'+f);j.expo.android=j.expo.android||{};j.expo.android.versionCode=${{ github.run_number }}+100;require('fs').writeFileSync(f,JSON.stringify(j,null,2)+'\n')"
echo "versionCode now: $(node -p "require('./app.json').expo.android.versionCode")"
- name: Purge stale generated sources