1.2.0 • Published 3 years ago

expo-build-notifier v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Expo Build Notifier

version npm

Use this to post a message to your chosen platform each time your Expo project is published. Current support for Discord, Slack and Telegram.

Installation

  1. Create a Webhook for the channel you want the messages to display in.

    • Discord
    • Slack
    • Telegram - Third party Article till I add one to the Github Wiki, You will need the access Token and Chat ID from this.
  2. Install the package as shown below:

NPMYarn
npm i expo-build-notifieryarn add expo-build-notifier
  1. Add one of the below examples to your app.json in the root of your Expo React Native App.

Examples

Basic Discord Usage

"expo": {
    "hooks": {
        "postPublish": [
        {
            "file": "expo-build-notifier",
            "config": {
                "type": "discord",
                "webhookURL": "Insert_Webhook_URL",
            }
        }
        ]
    }
}

Basic Slack Usage

"expo": {
    "hooks": {
        "postPublish": [
        {
            "file": "expo-build-notifier",
            "config": {
                "type": "slack",
                "webhookURL": "Insert_Webhook_URL",
            }
        }
        ]
    }
}

Basic Telegram Usage

"expo": {
    "hooks": {
        "postPublish": [
        {
            "file": "expo-build-notifier",
            "config": {
                "type": "telegram",
                "token": "API_Token",
                "chatID": "CHAT_ID"
            }
        }
        ]
    }
}

Optional Properties

"expo": {
    "hooks": {
        "postPublish": [
        {
            "file": "expo-build-notifier",
            "config": {
                "type": "discord",
                "webhookURL": "Insert_Webhook_URL",
                "usernameType": "discordWebhook",
                "hideVersion": true,
                "hideReleaseChannel": true
            }
        }
        ]
    }
}
RequiredParameterValueDefault ValueOptions
✔️ Yestypestring"discord", "slack"
✔️ YeswebhookURLstring
✔️ YeswebhookURLstring
❌ NousernameTypestrong"default""default", "discordWebhook"
❌ NohideVersionbooleanfalsetrue, false
❌ NohideTimestampbooleanfalsetrue, false

N.B. usernameType only works for Discord currently.

Roadmap

  1. ✔️ Add Slack Functionality (Version 1.1.0)
  2. ✔️ Add Telegram Support
  3. Add Telegram Help Guide in the Wiki Page
  4. Add Error Handling
  5. Add Teams Support
  6. Refactor Code
  7. Work towards Version 2
    • The aim for version 2 will be to add a build URL (.apk, .ipa) to the message instead of a link to the project page.

Notes

If you don't set the type, it will try and find the information from the URL (Doesn't work for Telegram). If this fails, it will error. It is still best practise to define the type.

License

MIT