Skip to content

Instantly share code, notes, and snippets.

@mrtry
Created August 5, 2024 08:30
Show Gist options
  • Save mrtry/a2cf01a88dce481e3b925353fee20268 to your computer and use it in GitHub Desktop.
Save mrtry/a2cf01a88dce481e3b925353fee20268 to your computer and use it in GitHub Desktop.
EAS Custom Build
build:
steps:
- eas/send_slack_message:
if: ${ always() }
inputs:
slack_hook_url: ${ eas.env.SLACK_WEBHOOK_URL }
payload:
blocks:
- type: section
text:
type: mrkdwn
text: ":large_yellow_circle: EAS Build *Started*"
- type: section
fields:
- type: mrkdwn
text: "*Commit message*\n<https://github.com/[your-organization]/[your-repository]/commit/${ eas.metadata.gitCommitHash }|${ eas.metadata.gitCommitHash } - ${ eas.metadata.gitCommitMessage }>"
- type: mrkdwn
text: "*Platform*\n${ eas.job.platform }"
- type: mrkdwn
text: "*Build Profile*\n${ eas.metadata.buildProfile }"
- type: mrkdwn
text: "*Version*\n${ eas.metadata.appVersion } (${ eas.metadata.appBuildVersion })"
- type: actions
elements:
- type: button
text:
type: plain_text
text: "Expo Dashboard"
url: "https://expo.dev/accounts/[your-organization]/projects/[your-project-name]/builds/${ eas.env.EAS_BUILD_ID }"
- eas/build
- eas/send_slack_message:
if: ${ success() }
inputs:
slack_hook_url: ${ eas.env.SLACK_WEBHOOK_URL }
payload:
blocks:
- type: section
text:
type: mrkdwn
text: ":large_green_circle: EAS Build *Succeed*"
- type: section
fields:
- type: mrkdwn
text: "*Commit message*\n<https://github.com/[your-organization]/[your-repository]/commit/${ eas.metadata.gitCommitHash }|${ eas.metadata.gitCommitHash } - ${ eas.metadata.gitCommitMessage }>"
- type: mrkdwn
text: "*Platform*\n${ eas.job.platform }"
- type: mrkdwn
text: "*Build Profile*\n${ eas.metadata.buildProfile }"
- type: mrkdwn
text: "*Version*\n${ eas.metadata.appVersion } (${ eas.metadata.appBuildVersion })"
- type: actions
elements:
- type: button
text:
type: plain_text
text: "Expo Dashboard"
url: "https://expo.dev/accounts/[your-organization]/projects/[your-project-name]/builds/${ eas.env.EAS_BUILD_ID }"
- eas/send_slack_message:
if: ${ failure() }
inputs:
slack_hook_url: ${ eas.env.SLACK_WEBHOOK_URL }
payload:
blocks:
- type: section
text:
type: mrkdwn
text: ":red_circle: EAS Build *Failed*"
- type: section
fields:
- type: mrkdwn
text: "*Commit message*\n<https://github.com/[your-organization]/[your-repository]/commit/${ eas.metadata.gitCommitHash }|${ eas.metadata.gitCommitHash } - ${ eas.metadata.gitCommitMessage }>"
- type: mrkdwn
text: "*Platform*\n${ eas.job.platform }"
- type: mrkdwn
text: "*Build Profile*\n${ eas.metadata.buildProfile }"
- type: mrkdwn
text: "*Version*\n${ eas.metadata.appVersion } (${ eas.metadata.appBuildVersion })"
- type: actions
elements:
- type: button
text:
type: plain_text
text: "Expo Dashboard"
url: "https://expo.dev/accounts/[your-organization]/projects/[your-project-name]/builds/${ eas.env.EAS_BUILD_ID }"
@mrtry
Copy link
Author

mrtry commented Aug 5, 2024

slack_message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment