A serverless lambda to notify the result of EAS build.
-
Discord Bot Setup
-
Needs the following bot permissions:
Read Messages/View Channels,Send Messages,Embed Links,Attach Files,Use External Emojis[optional],Add Reactions[optional] -
Invite bot to server (make sure the bot has proper permissions in your desired channel)
-
Create Serverless Account.
-
Further edit
serverless.tsif needed to set your desired AWS region, etc. -
Create a
.envfile and put it in the root directory. It should be in the following format:EAS_SECRET_WEBHOOK_KEY = DISCORD_BOT_TOKEN = DISCORD_CHANNEL_ID = -
Test locally by running:
pnpm dev
-
Deploy as Serverless App
npm i -g serverless pnpm i serverless --org=[username] # replace [username] with your Serverless org name serverless deploy # use if you did not deploy from previous command
-
-
EAS Build Webhooks setup
- Set up a webhook with
eas webhook:create.
The URL of the webhook is the URL of the endpoint returned byserverless deploy.
e.g.https://XXXXXXXX.execute-api.YOUR-REGION.amazonaws.com/dev/webhook
- Set up a webhook with
| NAME | Required | Description | Example/Document |
|---|---|---|---|
| EAS_SECRET_WEBHOOK_KEY | true | EAS | see SECRET_WEBHOOK_KEY |
| DISCORD_BOT_TOKEN | true | The OAuth token. | NzkyNzE1NDU0MTk2MDg4ODQy.X-hvzA.Ovy4MCQywSkoMRRclStW4xAYK7I |
| DISCORD_CHANNEL_ID | true | Discord channel | 8573456205924986 |
| EXPO_DEFAULT_TEAM_NAME | false | For team accounts, it will be undefined , so you can set a default value |
yourteam |


