don't ping slack on non-prod uploads

This commit is contained in:
Samuel Newman
2026-04-28 12:04:56 +01:00
parent 57b6e8464f
commit 6c5d9c21f3
3 changed files with 46 additions and 46 deletions
+9 -8
View File
@@ -63,7 +63,8 @@ jobs:
run: yarn intl:build 2>&1 | tee i18n.log run: yarn intl:build 2>&1 | tee i18n.log
- name: Check for i18n compilation errors - 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 # EXPO_PUBLIC_ENV is handled in eas.json
- name: Env - name: Env
@@ -85,12 +86,10 @@ jobs:
env: env:
PROFILE: ${{ inputs.profile || 'testflight-android' }} PROFILE: ${{ inputs.profile || 'testflight-android' }}
run: > run: >
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{
SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{
SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn
yarn use-build-number-with-bump use-build-number-with-bump eas build -p android --profile $PROFILE
eas build -p android
--profile $PROFILE
--local --output build.aab --non-interactive --local --output build.aab --non-interactive
- name: 📚 Get version from package.json - name: 📚 Get version from package.json
@@ -103,6 +102,7 @@ jobs:
run: eas submit -p android --profile $PROFILE --non-interactive --path build.aab run: eas submit -p android --profile $PROFILE --non-interactive --path build.aab
- name: 🔔 Notify Slack of Play Store Submission - name: 🔔 Notify Slack of Play Store Submission
if: ${{ inputs.profile == 'production' }}
uses: slackapi/slack-github-action@v1.25.0 uses: slackapi/slack-github-action@v1.25.0
with: with:
payload: | payload: |
@@ -119,7 +119,8 @@ jobs:
bundletool-version: "1.17.2" bundletool-version: "1.17.2"
- name: 🔑 Decode keystore - 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 - name: 📦 Build signed universal APK
run: | run: |
+10 -12
View File
@@ -76,7 +76,8 @@ jobs:
run: yarn intl:build 2>&1 | tee i18n.log run: yarn intl:build 2>&1 | tee i18n.log
- name: Check for i18n compilation errors - 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 # EXPO_PUBLIC_ENV is handled in eas.json
- name: ✏️ Write environment variables - name: ✏️ Write environment variables
@@ -97,13 +98,11 @@ jobs:
env: env:
PROFILE: ${{ inputs.profile || 'testflight' }} PROFILE: ${{ inputs.profile || 'testflight' }}
run: > run: >
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{
SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{
SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn
yarn use-build-number-with-bump use-build-number-with-bump eas build -p ios --profile $PROFILE --local
eas build -p ios --output build.tar.gz --non-interactive
--profile $PROFILE
--local --output build.tar.gz --non-interactive
- name: 📂 Extract build artifact - name: 📂 Extract build artifact
run: | run: |
@@ -145,10 +144,9 @@ jobs:
- name: 🪲 Upload dSYM to Sentry - name: 🪲 Upload dSYM to Sentry
run: > run: >
SENTRY_ORG=blueskyweb SENTRY_ORG=blueskyweb SENTRY_PROJECT=app SENTRY_AUTH_TOKEN=${{
SENTRY_PROJECT=app secrets.SENTRY_AUTH_TOKEN }} yarn sentry-cli debug-files upload
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources
yarn sentry-cli debug-files upload "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources
- name: 📚 Get version from package.json - name: 📚 Get version from package.json
id: get-build-info id: get-build-info
+27 -26
View File
@@ -82,7 +82,8 @@ jobs:
run: yarn intl:build 2>&1 | tee i18n.log run: yarn intl:build 2>&1 | tee i18n.log
- name: Check for i18n compilation errors - 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 - name: Type check
run: yarn typecheck run: yarn typecheck
@@ -127,10 +128,9 @@ jobs:
- name: 🏗️ Create Bundle - name: 🏗️ Create Bundle
if: ${{ !steps.fingerprint.outputs.includes-changes }} if: ${{ !steps.fingerprint.outputs.includes-changes }}
run: > run: >
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{
SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{
SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn export
yarn export
- name: 📦 Package Bundle and 🚀 Deploy - name: 📦 Package Bundle and 🚀 Deploy
if: ${{ !steps.fingerprint.outputs.includes-changes }} if: ${{ !steps.fingerprint.outputs.includes-changes }}
@@ -162,7 +162,9 @@ jobs:
needs: [bundleDeploy] needs: [bundleDeploy]
# Gotta check if its NOT '[]' because any md5 hash in the outputs is detected as a possible secret and won't be # Gotta check if its NOT '[]' because any md5 hash in the outputs is detected as a possible secret and won't be
# available here # 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: steps:
- name: Check for EXPO_TOKEN - name: Check for EXPO_TOKEN
run: > run: >
@@ -233,12 +235,10 @@ jobs:
- name: 🏗️ EAS Build - name: 🏗️ EAS Build
run: > run: >
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{
SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{
SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn
yarn use-build-number-with-bump use-build-number-with-bump eas build -p ios --profile testflight
eas build -p ios
--profile testflight
--local --output build.tar.gz --non-interactive --local --output build.tar.gz --non-interactive
- name: 📂 Extract build artifact - name: 📂 Extract build artifact
@@ -281,10 +281,9 @@ jobs:
- name: 🪲 Upload dSYM to Sentry - name: 🪲 Upload dSYM to Sentry
run: > run: >
SENTRY_ORG=blueskyweb SENTRY_ORG=blueskyweb SENTRY_PROJECT=app SENTRY_AUTH_TOKEN=${{
SENTRY_PROJECT=app secrets.SENTRY_AUTH_TOKEN }} yarn sentry-cli debug-files upload
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources
yarn sentry-cli debug-files upload "$BUILD_DIR/Bluesky.app.dSYM.zip" --include-sources
- name: ⬇️ Restore Cache - name: ⬇️ Restore Cache
id: get-base-commit id: get-base-commit
@@ -309,7 +308,9 @@ jobs:
needs: [bundleDeploy] needs: [bundleDeploy]
# Gotta check if its NOT '[]' because any md5 hash in the outputs is detected as a possible secret and won't be # Gotta check if its NOT '[]' because any md5 hash in the outputs is detected as a possible secret and won't be
# available here # 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: steps:
- name: Check for EXPO_TOKEN - name: Check for EXPO_TOKEN
@@ -369,20 +370,19 @@ jobs:
- name: 🏗️ EAS Build - name: 🏗️ EAS Build
run: > run: >
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_RELEASE=${{
SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} SENTRY_DIST=${{
SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} yarn
yarn use-build-number-with-bump use-build-number-with-bump eas build -p android --profile
eas build -p android testflight-android --local --output build.aab --non-interactive
--profile testflight-android
--local --output build.aab --non-interactive
- name: 📚 Get version from package.json - name: 📚 Get version from package.json
id: get-build-info id: get-build-info
run: bash scripts/setGitHubOutput.sh run: bash scripts/setGitHubOutput.sh
- name: 🚀 Submit to Google Play - 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 - name: 🔧 Setup bundletool
uses: amyu/setup-bundletool@v1 uses: amyu/setup-bundletool@v1
@@ -390,7 +390,8 @@ jobs:
bundletool-version: "1.17.2" bundletool-version: "1.17.2"
- name: 🔑 Decode keystore - 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 - name: 📦 Build signed universal APK
run: | run: |