mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-26 04:22:05 +02:00
81de8addf1
Set MarkdownV2 as parse mode for Telegram announcer. This allows for additional formatting in the announcement, such as `code` or _italic_ sections. For details, see the official [Telegram Bot API](https://core.telegram.org/bots/api#markdownv2-style). If someone has the time (not added in this PR), I think it would be great to add a field to the Telegram config for the parse mode. This would allow setting a different parse mode than MarkdownV2, such as HTML. This fixes #3431.
943 B
943 B
Telegram
For it to work, you'll need to create a new Telegram app, and set some environment variables on your pipeline:
TELEGRAM_TOKEN
Also you need to know your channel's chat ID to talk with.
Then, you can add something like the following to your .goreleaser.yaml
config:
# .goreleaser.yaml
announce:
telegram:
# Whether its enabled or not.
# Defaults to false.
enabled: true
# Integer representation of your channel
chat_id: 123456
# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
message_template: 'Awesome project {{.Tag}} is out!'
You can format your message using MarkdownV2, for reference, see the Telegram Bot API.
!!! tip Learn more about the name template engine.