about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-04-09 17:00:14 -0700
committerGitHub <noreply@github.com>2024-04-09 17:00:14 -0700
commit26f5e02afa70af8d72779d455eb512817e62e177 (patch)
tree3cfc2d9a578a23faf2939412a2d7ba4eb4d91552
parentee87f2cadd07519516bd8cc344d7559d4a6222aa (diff)
downloadvoidsky-26f5e02afa70af8d72779d455eb512817e62e177.tar.zst
notify slack on production builds (#3460)
-rw-r--r--.github/workflows/build-submit-android.yml39
1 files changed, 28 insertions, 11 deletions
diff --git a/.github/workflows/build-submit-android.yml b/.github/workflows/build-submit-android.yml
index dec4e0e7e..9d7790da0 100644
--- a/.github/workflows/build-submit-android.yml
+++ b/.github/workflows/build-submit-android.yml
@@ -62,38 +62,55 @@ jobs:
       - name: 🏗️ EAS Build
         run: yarn use-build-number-with-bump eas build -p android --profile ${{ inputs.profile || 'testflight-android' }} --local --output build.aab --non-interactive
 
-      - name: 🚀 Deploy
-        if: ${{ inputs.profile == 'production' }}
-        run: eas submit -p android --non-interactive --path build.aab
-
-      - name: ✍️ Rename bundle
+      - name: ✍️ Rename Testflight bundle
         if: ${{ inputs.profile != 'production' }}
         run: mv build.aab build.apk
 
       - name: ⏰ Get a timestamp
         id: timestamp
-        if: ${{ inputs.profile != 'production' }}
         uses: nanzm/get-time-action@master
         with:
           format: 'MM-DD-HH-mm-ss'
 
-      - name: 🚀 Upload Artifact
-        id: upload-artifact
+      - name: 🚀 Upload Production Artifact
+        id: upload-artifact-production
+        if: ${{ inputs.profile == 'production' }}
+        uses: actions/upload-artifact@v4
+        with:
+          retention-days: 30
+          compression-level: 6
+          name: build-${{ steps.timestamp.outputs.time }}.aab
+          path: build.apk
+
+      - name: 🚀 Upload Testflight Artifact
+        id: upload-artifact-testflight
         if: ${{ inputs.profile != 'production' }}
         uses: actions/upload-artifact@v4
         with:
           retention-days: 30
-          compression-level: 0
+          compression-level: 6
           name: build-${{ steps.timestamp.outputs.time }}.apk
           path: build.apk
 
-      - name: 🔔 Notify Slack
+      - name: 🔔 Notify Slack of Production Build
+        if: ${{ inputs.profile == 'production' }}
+        uses: slackapi/slack-github-action@v1.25.0
+        with:
+          payload: |
+            {
+              "text": "Android build is ready for submission. This is a production build! Download the artifact here: ${{ steps.upload-artifact-production.outputs.artifact-url }}"
+            }
+        env:
+          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLIENT_ALERT_WEBHOOK }}
+          SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
+
+      - name: 🔔 Notify Slack of Testflight Build
         if: ${{ inputs.profile != 'production' }}
         uses: slackapi/slack-github-action@v1.25.0
         with:
           payload: |
             {
-              "text": "Android build is ready for testing. Download the artifact here: ${{ steps.upload-artifact.outputs.artifact-url }}"
+              "text": "Android build is ready for testing. Download the artifact here: ${{ steps.upload-artifact-testflight.outputs.artifact-url }}"
             }
         env:
           SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLIENT_ALERT_WEBHOOK }}