-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notify slack on production builds (#3460)
- Loading branch information
Showing
1 changed file
with
28 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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/[email protected] | ||
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 }} | ||
|