From ed64e2df93de7d87abd14bc8362fdaa85d9c28e3 Mon Sep 17 00:00:00 2001 From: Rishi Balakrishnan Date: Sat, 11 Jul 2026 11:31:08 -0400 Subject: [PATCH] fix(ci): repair OTA deploy, nightly iOS submit, and language extraction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three CI workflows were failing on every run: 1. Bundle & Deploy EAS Update (OTA) — the eoas `--message` argument was mangled because useBuildNumberEnv.sh flattened all args into a single `bash -c "... $*"` string that a nested shell re-parsed. Merge-commit messages (spaces, `#`, newlines) got word-split into bogus args and partially executed. Both build-number wrapper scripts now `export` the version vars and `exec "$@"`, preserving argument boundaries. 2. Nightly iOS build — the deploy/build-number/dSYM steps hardcoded `Bluesky.ipa`, but this fork's Xcode scheme is "Blacksky", so EAS emits `Blacksky.ipa` / `Blacksky.app.dSYM.zip`. The extract step now exports the discovered IPA_PATH and DSYM_PATH and downstream steps use them, making the pipeline rename-proof. Applied in both build-submit-ios.yml and the pasted iOS job in bundle-deploy-eas-update.yml. 3. Nightly Update Source Languages — the "Push source lang to Crowdin" step always failed on an empty api_token (no Crowdin subscription). Extraction exists only to catch strings that fail to render, not to sync translations, so the Crowdin step is removed; extract + auto-commit remain. --- .github/workflows/build-submit-ios.yml | 13 ++++++++++--- .github/workflows/bundle-deploy-eas-update.yml | 11 +++++++++-- .../nightly-update-source-languages.yaml | 15 ++++----------- scripts/useBuildNumberEnv.sh | 8 +++++++- scripts/useBuildNumberEnvWithBump.sh | 7 ++++++- 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-submit-ios.yml b/.github/workflows/build-submit-ios.yml index 815a1a837..89fddbecd 100644 --- a/.github/workflows/build-submit-ios.yml +++ b/.github/workflows/build-submit-ios.yml @@ -168,21 +168,28 @@ jobs: echo "" echo "Build dir contents:" ls -la "$BUILD_DIR" + # Export the discovered paths rather than hardcoding a product name. + # The Xcode scheme is "Blacksky" in this fork, so the artifacts are + # Blacksky.ipa / Blacksky.app.dSYM.zip — downstream steps must use the + # paths we actually found, not a fixed "Bluesky.ipa". + DSYM_PATH="$(find ios-build -type f -name '*.app.dSYM.zip' -print -quit)" echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_ENV + echo "IPA_PATH=$IPA_PATH" >> $GITHUB_ENV + echo "DSYM_PATH=$DSYM_PATH" >> $GITHUB_ENV else echo "Archive file not found!" exit 1 fi - name: 🚀 Deploy - run: pnpm eas submit -p ios --non-interactive --path "$BUILD_DIR/Bluesky.ipa" + run: pnpm eas submit -p ios --non-interactive --path "$IPA_PATH" - name: 🪲 Upload dSYM to Sentry run: > SENTRY_ORG=blacksky-algorithms SENTRY_PROJECT=social-app SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - pnpm sentry-cli debug-files upload "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources + pnpm sentry-cli debug-files upload "$DSYM_PATH" --include-sources - name: 📚 Get version from package.json id: get-build-info @@ -197,7 +204,7 @@ jobs: id: ipa-build-number run: | plist_dir="$(mktemp -d)" - unzip -o -q "$BUILD_DIR/Bluesky.ipa" 'Payload/*.app/Info.plist' -d "$plist_dir" + unzip -o -q "$IPA_PATH" 'Payload/*.app/Info.plist' -d "$plist_dir" plist="$(find "$plist_dir" -name Info.plist -print -quit)" build_number="$(/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' "$plist")" rm -rf "$plist_dir" diff --git a/.github/workflows/bundle-deploy-eas-update.yml b/.github/workflows/bundle-deploy-eas-update.yml index e5dc1bd49..c80ec62cc 100644 --- a/.github/workflows/bundle-deploy-eas-update.yml +++ b/.github/workflows/bundle-deploy-eas-update.yml @@ -276,21 +276,28 @@ jobs: echo "" echo "Build dir contents:" ls -la "$BUILD_DIR" + # Export the discovered paths rather than hardcoding a product name. + # The Xcode scheme is "Blacksky" in this fork, so the artifacts are + # Blacksky.ipa / Blacksky.app.dSYM.zip — downstream steps must use the + # paths we actually found, not a fixed "Bluesky.ipa". + DSYM_PATH="$(find ios-build -type f -name '*.app.dSYM.zip' -print -quit)" echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_ENV + echo "IPA_PATH=$IPA_PATH" >> $GITHUB_ENV + echo "DSYM_PATH=$DSYM_PATH" >> $GITHUB_ENV else echo "Archive file not found!" exit 1 fi - name: 🚀 Deploy - run: pnpm eas submit -p ios --non-interactive --path "$BUILD_DIR/Bluesky.ipa" + run: pnpm eas submit -p ios --non-interactive --path "$IPA_PATH" - name: 🪲 Upload dSYM to Sentry run: > SENTRY_ORG=blacksky-algorithms SENTRY_PROJECT=social-app SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - pnpm sentry-cli debug-files upload "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources + pnpm sentry-cli debug-files upload "$DSYM_PATH" --include-sources - name: ⬇️ Restore Cache id: get-base-commit diff --git a/.github/workflows/nightly-update-source-languages.yaml b/.github/workflows/nightly-update-source-languages.yaml index e6094476a..0acbc30f2 100644 --- a/.github/workflows/nightly-update-source-languages.yaml +++ b/.github/workflows/nightly-update-source-languages.yaml @@ -27,6 +27,10 @@ jobs: cache: pnpm - name: pnpm install run: pnpm install --frozen-lockfile + # We run extraction purely to catch strings that fail to compile/render, not + # to sync translations. Blacksky has no Crowdin subscription, so the previous + # "Push source lang to Crowdin" step always failed on an empty api_token. It + # has been removed; the extract + auto-commit of messages.po is the useful part. - name: Extract language strings run: pnpm intl:extract - name: Create commit @@ -34,14 +38,3 @@ jobs: with: commit_message: Nightly source-language update file_pattern: ./src/locale/locales/en/messages.po - - name: Push source lang to Crowdin - uses: crowdin/github-action@52aa776766211d83d975df51f3b9c53c2f8ba35f # v2.16.3 - with: - upload_sources: true - upload_sources_args: "-b main" - upload_translations: false - push_translations: false - push_sources: false - create_pull_request: false - env: - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/scripts/useBuildNumberEnv.sh b/scripts/useBuildNumberEnv.sh index b2cbabcd5..d98cf99f3 100755 --- a/scripts/useBuildNumberEnv.sh +++ b/scripts/useBuildNumberEnv.sh @@ -8,4 +8,10 @@ outputAndroid=$(eas build:version:get -p android) BSKY_IOS_BUILD_NUMBER=${outputIos#*buildNumber - } BSKY_ANDROID_VERSION_CODE=${outputAndroid#*versionCode - } -bash -c "BSKY_IOS_BUILD_NUMBER=$BSKY_IOS_BUILD_NUMBER BSKY_ANDROID_VERSION_CODE=$BSKY_ANDROID_VERSION_CODE $*" +# Export the build-number vars and exec the wrapped command directly. Using +# `exec "$@"` preserves argument boundaries; the old `bash -c "... $*"` flattened +# every argument into one string that a nested shell re-parsed, which mangled +# arguments containing spaces, `#`, or newlines (e.g. the multi-line `--message` +# passed to `eoas publish`). +export BSKY_IOS_BUILD_NUMBER BSKY_ANDROID_VERSION_CODE +exec "$@" diff --git a/scripts/useBuildNumberEnvWithBump.sh b/scripts/useBuildNumberEnvWithBump.sh index e08af99e6..645242107 100755 --- a/scripts/useBuildNumberEnvWithBump.sh +++ b/scripts/useBuildNumberEnvWithBump.sh @@ -11,5 +11,10 @@ currentAndroidVersion=${outputAndroid#*versionCode - } BSKY_IOS_BUILD_NUMBER=$((currentIosVersion+1)) BSKY_ANDROID_VERSION_CODE=$((currentAndroidVersion+1)) -bash -c "BSKY_IOS_BUILD_NUMBER=$BSKY_IOS_BUILD_NUMBER BSKY_ANDROID_VERSION_CODE=$BSKY_ANDROID_VERSION_CODE $*" +# Export the build-number vars and exec the wrapped command directly. Using +# `exec "$@"` preserves argument boundaries; the old `bash -c "... $*"` flattened +# every argument into one string that a nested shell re-parsed, which mangled +# arguments containing spaces, `#`, or newlines. +export BSKY_IOS_BUILD_NUMBER BSKY_ANDROID_VERSION_CODE +exec "$@" -- knotmirror 0.0.1