github.com/ahmet2mir/goreleaser@v0.180.3-0.20210927151101-8e5ee5a9b8c5/www/docs/customization/announce.md (about) 1 --- 2 title: Announce 3 --- 4 5 GoReleaser can also announce new releases to Twitter, Reddit, Slack, Discourse and Microsoft Teams. 6 7 It runs at the very end of the pipeline and can be skipped with the `--skip-announce` flag of 8 the [`release`](/cmd/goreleaser_release/) command. 9 10 ## Twitter 11 12 For it to work, you'll need to [create a new Twitter app](https://developer.twitter.com/en/portal/apps/new), and set 13 some environment variables on your pipeline: 14 15 - `TWITTER_CONSUMER_KEY` 16 - `TWITTER_CONSUMER_SECRET` 17 - `TWITTER_ACCESS_TOKEN` 18 - `TWITTER_ACCESS_TOKEN_SECRET` 19 20 Then, you can add something like the following to your `.goreleaser.yml` config: 21 22 ```yaml 23 # .goreleaser.yml 24 announce: 25 twitter: 26 # Whether its enabled or not. 27 # Defaults to false. 28 enabled: true 29 30 # Message template to use while publishing. 31 # Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .GitURL }}/releases/tag/{{ .Tag }}` 32 message_template: 'Awesome project {{.Tag}} is out!' 33 ``` 34 35 ## Teams 36 37 To use [Teams](https://www.microsoft.com/de-de/microsoft-teams/group-chat-software), you need 38 to [create a Webhook](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook) 39 , and set following environment variable on your pipeline: 40 41 - `TEAMS_WEBHOOK` 42 43 After this, you can add following section to your `.goreleaser.yml` config: 44 45 ```yaml 46 # .goreleaser.yml 47 announce: 48 teams: 49 # Whether its enabled or not. 50 # Defaults to false. 51 enabled: true 52 53 # Title template to use while publishing. 54 # Defaults to `{{ .ProjectName }} {{ .Tag }} is out!` 55 title_template: 'GoReleaser {{ .Tag }} was just released!' 56 57 # Message template to use while publishing. 58 # Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .GitURL }}/releases/tag/{{ .Tag }}` 59 message_template: 'Awesome project {{.Tag}} is out!' 60 61 # Color code of the message. You have to use hexadecimal. 62 # Defaults to `#2D313E` - the grey-ish from goreleaser 63 color: '' 64 65 # URL to an image to use as the icon for the message. 66 # Defaults to `https://goreleaser.com/static/avatar.png` 67 icon_url: '' 68 ``` 69 70 ## Discord 71 72 To use [Discord](https://discord.com/), you need 73 to [create a Webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks), and set following 74 environment variables on your pipeline: 75 76 - `DISCORD_WEBHOOK_ID` 77 - `DISCORD_WEBHOOK_TOKEN` 78 79 After this, you can add following section to your `.goreleaser.yml` config: 80 81 ```yaml 82 # .goreleaser.yml 83 announce: 84 discord: 85 # Whether its enabled or not. 86 # Defaults to false. 87 enabled: true 88 89 # Message template to use while publishing. 90 # Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .GitURL }}/releases/tag/{{ .Tag }}` 91 message_template: 'Awesome project {{.Tag}} is out!' 92 93 # Set author of the embed. 94 # Defaults to `GoReleaser` 95 author: '' 96 97 # Color code of the embed. You have to use decimal numeral system, not hexadecimal. 98 # Defaults to `3888754` - the grey-ish from goreleaser 99 color: '' 100 101 # URL to an image to use as the icon for the embed. 102 # Defaults to `https://goreleaser.com/static/avatar.png` 103 icon_url: '' 104 ``` 105 106 ## Slack 107 108 For it to work, you'll need to [create a new Incoming Webhook](https://api.slack.com/messaging/webhooks), and set some 109 environment variables on your pipeline: 110 111 - `SLACK_WEBHOOK` 112 113 Then, you can add something like the following to your `.goreleaser.yml` config: 114 115 ```yaml 116 # .goreleaser.yml 117 announce: 118 slack: 119 # Whether its enabled or not. 120 # Defaults to false. 121 enabled: true 122 123 # Message template to use while publishing. 124 # Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .GitURL }}/releases/tag/{{ .Tag }}` 125 message_template: 'Awesome project {{.Tag}} is out!' 126 127 # The name of the channel that the user selected as a destination for webhook messages. 128 channel: '#channel' 129 130 # Set your Webhook's user name. 131 username: '' 132 133 # Emoji to use as the icon for this message. Overrides icon_url. 134 icon_emoji: '' 135 136 # URL to an image to use as the icon for this message. 137 icon_url: '' 138 ``` 139 140 !!! tip Learn more about the [name template engine](/customization/templates/). 141 142 ## Reddit 143 144 For it to work, you'll need to [create a new Reddit app](https://www.reddit.com/prefs/apps), and set some environment 145 variables on your pipeline: 146 147 - `REDDIT_SECRET` 148 - `REDDIT_PASSWORD` 149 150 Then, you can add something like the following to your `.goreleaser.yml` config: 151 152 ```yaml 153 # .goreleaser.yml 154 announce: 155 reddit: 156 # Whether its enabled or not. 157 # Defaults to false. 158 enabled: true 159 160 # Application ID for Reddit Application 161 application_id: "" 162 163 # Username for your Reddit account 164 username: "" 165 166 # URL template to use while publishing. 167 # Defaults to `{{ .GitURL }}/releases/tag/{{ .Tag }}` 168 url_template: 'https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}' 169 170 # Title template to use while publishing. 171 # Defaults to `{{ .ProjectName }} {{ .Tag }} is out!` 172 title_template: ''GoReleaser {{ .Tag }} was just released!'' 173 ``` 174 175 ## SMTP 176 177 For it to work, you'll need to set some environment variables on your pipeline: 178 179 - `SMTP_PASSWORD` 180 181 Then, you can add something like the following to your `.goreleaser.yml` config: 182 183 ```yaml 184 # .goreleaser.yml 185 announce: 186 smtp: 187 # Whether its enabled or not. 188 # Defaults to false. 189 enabled: true 190 191 # SMTP Host 192 host: "smtp.gmail.com" 193 194 # SMTP Port 195 port: 587 196 197 # Sender of the email 198 from: "" 199 200 # Receivers of the email 201 to: 202 - "" 203 - "" 204 205 # Owner of the email 206 username: "" 207 208 # Body template to use within the email. 209 # Defaults to `You can view details from: {{ .GitURL }}/releases/tag/{{ .Tag }}` 210 body_template: 'https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}' 211 212 # Subject template to use within the email subject. 213 # Defaults to `{{ .ProjectName }} {{ .Tag }} is out!` 214 subject_template: ''GoReleaser {{ .Tag }} was just released!'' 215 ```