Skip to content

Latest commit

 

History

History
78 lines (60 loc) · 4.03 KB

README.md

File metadata and controls

78 lines (60 loc) · 4.03 KB

Collab Logo

EAS Build Webhook Notification

A serverless lambda to notify the result of EAS build.

Collab Logo

Installation

  1. Discord Bot Setup

    1. Create Discord Bot

      Needs the following bot permissions: Read Messages/View Channels, Send Messages, Embed Links, Attach Files, Use External Emojis [optional], Add Reactions [optional]

    2. Invite bot to server (make sure the bot has proper permissions in your desired channel)

    3. Create Serverless Account.

    4. Further edit serverless.ts if needed to set your desired AWS region, etc.

    5. Create a .env file and put it in the root directory. It should be in the following format:

      EAS_SECRET_WEBHOOK_KEY =
      DISCORD_BOT_TOKEN =
      DISCORD_CHANNEL_ID =
      
    6. Test locally by running:

      pnpm dev
    7. 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
  2. EAS Build Webhooks setup

    1. Set up a webhook with eas webhook:create.
      The URL of the webhook is the URL of the endpoint returned by serverless deploy.
      e.g. https://XXXXXXXX.execute-api.YOUR-REGION.amazonaws.com/dev/webhook

Environment

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

License

Screenshots

Success Fail