From 6c5d9c21f3e30ea588559c5d3dd9cdd97f26d10e Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 28 Apr 2026 12:04:56 +0100 Subject: [PATCH] don't ping slack on non-prod uploads --- .github/workflows/build-submit-android.yml | 17 +++--- .github/workflows/build-submit-ios.yml | 22 ++++---- .../workflows/bundle-deploy-eas-update.yml | 53 ++++++++++--------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build-submit-android.yml b/.github/workflows/build-submit-android.yml index d065bdaaa5..6deb869142 100644 --- a/.github/workflows/build-submit-android.yml +++ b/.github/workflows/build-submit-android.yml @@ -63,7 +63,8 @@ jobs: run: yarn intl:build 2>&1 | tee i18n.log - name: Check for i18n compilation errors - run: if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi + run: if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation + errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi # EXPO_PUBLIC_ENV is handled in eas.json - name: Env @@ -85,12 +86,10 @@ jobs: env: PROFILE: ${{ inputs.profile || 'testflight-android' }} run: > - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} - SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} - yarn use-build-number-with-bump - eas build -p android - --profile $PROFILE + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{ + steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{ + steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn + use-build-number-with-bump eas build -p android --profile $PROFILE --local --output build.aab --non-interactive - name: 📚 Get version from package.json @@ -103,6 +102,7 @@ jobs: run: eas submit -p android --profile $PROFILE --non-interactive --path build.aab - name: 🔔 Notify Slack of Play Store Submission + if: ${{ inputs.profile == 'production' }} uses: slackapi/slack-github-action@v1.25.0 with: payload: | @@ -119,7 +119,8 @@ jobs: bundletool-version: "1.17.2" - name: 🔑 Decode keystore - run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > keystore.jks + run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > + keystore.jks - name: 📦 Build signed universal APK run: | diff --git a/.github/workflows/build-submit-ios.yml b/.github/workflows/build-submit-ios.yml index 338ce132bb..2b316895e7 100644 --- a/.github/workflows/build-submit-ios.yml +++ b/.github/workflows/build-submit-ios.yml @@ -76,7 +76,8 @@ jobs: run: yarn intl:build 2>&1 | tee i18n.log - name: Check for i18n compilation errors - run: if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi + run: if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation + errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi # EXPO_PUBLIC_ENV is handled in eas.json - name: ✏️ Write environment variables @@ -97,13 +98,11 @@ jobs: env: PROFILE: ${{ inputs.profile || 'testflight' }} run: > - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} - SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} - yarn use-build-number-with-bump - eas build -p ios - --profile $PROFILE - --local --output build.tar.gz --non-interactive + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{ + steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{ + steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn + use-build-number-with-bump eas build -p ios --profile $PROFILE --local + --output build.tar.gz --non-interactive - name: 📂 Extract build artifact run: | @@ -145,10 +144,9 @@ jobs: - name: 🪲 Upload dSYM to Sentry run: > - SENTRY_ORG=blueskyweb - SENTRY_PROJECT=app - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - yarn sentry-cli debug-files upload "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources + SENTRY_ORG=blueskyweb SENTRY_PROJECT=app SENTRY_AUTH_TOKEN=${{ + secrets.SENTRY_AUTH_TOKEN }} yarn sentry-cli debug-files upload + "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources - name: 📚 Get version from package.json id: get-build-info diff --git a/.github/workflows/bundle-deploy-eas-update.yml b/.github/workflows/bundle-deploy-eas-update.yml index 38b5066161..5bf17f90b4 100644 --- a/.github/workflows/bundle-deploy-eas-update.yml +++ b/.github/workflows/bundle-deploy-eas-update.yml @@ -82,7 +82,8 @@ jobs: run: yarn intl:build 2>&1 | tee i18n.log - name: Check for i18n compilation errors - run: if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi + run: if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation + errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi - name: Type check run: yarn typecheck @@ -127,10 +128,9 @@ jobs: - name: 🏗️ Create Bundle if: ${{ !steps.fingerprint.outputs.includes-changes }} run: > - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} - SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} - yarn export + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{ + steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{ + steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn export - name: 📦 Package Bundle and 🚀 Deploy if: ${{ !steps.fingerprint.outputs.includes-changes }} @@ -162,7 +162,9 @@ jobs: needs: [bundleDeploy] # Gotta check if its NOT '[]' because any md5 hash in the outputs is detected as a possible secret and won't be # available here - if: ${{ inputs.channel != 'production' && needs.bundleDeploy.outputs.changes-detected && github.repository == 'bluesky-social/social-app' }} + if: ${{ inputs.channel != 'production' && + needs.bundleDeploy.outputs.changes-detected && github.repository == + 'bluesky-social/social-app' }} steps: - name: Check for EXPO_TOKEN run: > @@ -233,12 +235,10 @@ jobs: - name: 🏗️ EAS Build run: > - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} - SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} - yarn use-build-number-with-bump - eas build -p ios - --profile testflight + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{ + steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{ + steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn + use-build-number-with-bump eas build -p ios --profile testflight --local --output build.tar.gz --non-interactive - name: 📂 Extract build artifact @@ -281,10 +281,9 @@ jobs: - name: 🪲 Upload dSYM to Sentry run: > - SENTRY_ORG=blueskyweb - SENTRY_PROJECT=app - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - yarn sentry-cli debug-files upload "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources + SENTRY_ORG=blueskyweb SENTRY_PROJECT=app SENTRY_AUTH_TOKEN=${{ + secrets.SENTRY_AUTH_TOKEN }} yarn sentry-cli debug-files upload + "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources - name: ⬇️ Restore Cache id: get-base-commit @@ -309,7 +308,9 @@ jobs: needs: [bundleDeploy] # Gotta check if its NOT '[]' because any md5 hash in the outputs is detected as a possible secret and won't be # available here - if: ${{ inputs.channel != 'production' && needs.bundleDeploy.outputs.changes-detected && github.repository == 'bluesky-social/social-app'}} + if: ${{ inputs.channel != 'production' && + needs.bundleDeploy.outputs.changes-detected && github.repository == + 'bluesky-social/social-app'}} steps: - name: Check for EXPO_TOKEN @@ -369,20 +370,19 @@ jobs: - name: 🏗️ EAS Build run: > - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} - SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} - yarn use-build-number-with-bump - eas build -p android - --profile testflight-android - --local --output build.aab --non-interactive + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{ + steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{ + steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn + use-build-number-with-bump eas build -p android --profile + testflight-android --local --output build.aab --non-interactive - name: 📚 Get version from package.json id: get-build-info run: bash scripts/setGitHubOutput.sh - name: 🚀 Submit to Google Play - run: eas submit -p android --profile testflight-android --non-interactive --path build.aab + run: eas submit -p android --profile testflight-android --non-interactive --path + build.aab - name: 🔧 Setup bundletool uses: amyu/setup-bundletool@v1 @@ -390,7 +390,8 @@ jobs: bundletool-version: "1.17.2" - name: 🔑 Decode keystore - run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > keystore.jks + run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > + keystore.jks - name: 📦 Build signed universal APK run: |