Skip to content

Commit 28293fd

Browse files
authored
ci(mobile): stop OTA workflow from wiping CodePush release history (#14339)
1 parent 3f4eac3 commit 28293fd

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/mobile.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ jobs:
197197
runs-on: ubuntu-latest
198198
needs: [mobile-install, mobile-version-check]
199199
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.mobile-version-check.outputs.version_unchanged == 'true') || (github.event_name == 'workflow_dispatch' && (github.event.inputs.ota_channel == 'rc' || github.event.inputs.ota_channel == ''))
200+
# Serialize per-platform publishes so two concurrent runs can't read-modify-write
201+
# the same s3://.../mobile-ota/histories/<platform>/rc/<binary>.json and clobber each
202+
# other's release entry.
203+
concurrency:
204+
group: mobile-ota-release-rc-${{ matrix.platform }}
205+
cancel-in-progress: false
200206
strategy:
201207
fail-fast: false
202208
matrix:
@@ -288,8 +294,6 @@ jobs:
288294
OTA_APP_VERSION="${MAJOR}.${MINOR}.${OTA_PATCH}"
289295
290296
cd packages/mobile
291-
npx code-push create-history --binary-version "$BINARY_VERSION" --platform ${{ matrix.platform }} --identifier "$OTA_CHANNEL" || true
292-
293297
npx code-push release \
294298
--binary-version "$BINARY_VERSION" \
295299
--app-version "$OTA_APP_VERSION" \
@@ -307,6 +311,9 @@ jobs:
307311
environment:
308312
name: mobile-production-ota
309313
url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
314+
concurrency:
315+
group: mobile-ota-release-production-${{ matrix.platform }}
316+
cancel-in-progress: false
310317
strategy:
311318
fail-fast: false
312319
matrix:
@@ -388,8 +395,6 @@ jobs:
388395
OTA_APP_VERSION="${MAJOR}.${MINOR}.${OTA_PATCH}"
389396
390397
cd packages/mobile
391-
npx code-push create-history --binary-version "$BINARY_VERSION" --platform ${{ matrix.platform }} --identifier "$OTA_CHANNEL" || true
392-
393398
npx code-push release \
394399
--binary-version "$BINARY_VERSION" \
395400
--app-version "$OTA_APP_VERSION" \

0 commit comments

Comments
 (0)