From aade39867bb86ff3add0d09f37c8217b41da0126 Mon Sep 17 00:00:00 2001 From: tianma-if Date: Tue, 25 Aug 2026 20:45:17 +0800 Subject: [PATCH] fix(release): tolerate unrelated recovery install failure --- .github/workflows/store-delivery.yml | 9 +++++++++ scripts/store-delivery.test.mjs | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/store-delivery.yml b/.github/workflows/store-delivery.yml index cad7e676..c6e5efa3 100644 --- a/.github/workflows/store-delivery.yml +++ b/.github/workflows/store-delivery.yml @@ -165,10 +165,19 @@ jobs: token: ${{ secrets.EXPO_TOKEN }} - name: Install dependencies + if: ${{ !inputs.recover_play_apk }} run: >- bun install --frozen-lockfile --cache-dir "$RUNNER_TEMP/edgeever-bun-cache-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" + - name: Install Play APK recovery dependency + if: ${{ inputs.recover_play_apk }} + run: | + if ! bun install --frozen-lockfile \ + --cache-dir "$RUNNER_TEMP/edgeever-bun-cache-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"; then + node --input-type=module -e "await import('google-auth-library')" + fi + - name: Restore Android upload keystore if: ${{ !inputs.recover_play_apk }} env: diff --git a/scripts/store-delivery.test.mjs b/scripts/store-delivery.test.mjs index e1849a6c..1cbb5476 100644 --- a/scripts/store-delivery.test.mjs +++ b/scripts/store-delivery.test.mjs @@ -52,7 +52,7 @@ describe("store delivery command", () => { workflow.match( /edgeever-bun-cache-\$\{GITHUB_RUN_ID\}-\$\{GITHUB_RUN_ATTEMPT\}/g, ), - ).toHaveLength(2); + ).toHaveLength(3); }); test("replaces the GitHub APK with the Play-signed universal APK", () => { @@ -67,7 +67,11 @@ describe("store delivery command", () => { expect(workflow).toContain('gh release upload "$RELEASE_TAG" "$apk_path"'); expect( workflow.match(/if: \$\{\{ !inputs\.recover_play_apk \}\}/g), - ).toHaveLength(5); + ).toHaveLength(6); + expect(workflow).toContain("if: ${{ inputs.recover_play_apk }}"); + expect(workflow).toContain( + "node --input-type=module -e \"await import('google-auth-library')\"", + ); }); test("can prepare a matching Draft before formal publication", () => {