expo-build-notifier
v1.2.0
Published
A simple notification for expo builds
Downloads
9
Maintainers
Readme
Expo Build Notifier
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
Create a Webhook for the channel you want the messages to display in.
Install the package as shown below:
| NPM | Yarn |
| --------------------------------- | ------------------------------------ |
| npm i expo-build-notifier
| yarn add expo-build-notifier
|
- 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
}
}
]
}
}
| Required | Parameter | Value | Default Value | Options | | :------: | ------------- | ------- | ------------- | --------------------------- | | ✔️ Yes | type | string | | "discord", "slack" | | ✔️ Yes | webhookURL | string | | | | ✔️ Yes | webhookURL | string | | | | ❌ No | usernameType | strong | "default" | "default", "discordWebhook" | | ❌ No | hideVersion | boolean | false | true, false | | ❌ No | hideTimestamp | boolean | false | true, false |
N.B. usernameType only works for Discord currently.
Roadmap
- ✔️ Add Slack Functionality (Version 1.1.0)
- ✔️ Add Telegram Support
- Add Telegram Help Guide in the Wiki Page
- Add Error Handling
- Add Teams Support
- Refactor Code
- 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.