2021-09-27 22:43:00 -03:00
|
|
|
# Twitter
|
|
|
|
|
2023-02-02 21:06:34 -03:00
|
|
|
!!! warning
|
2024-06-19 11:44:22 -03:00
|
|
|
Twitter has [announced][tw] that API usage will no longer be free starting
|
|
|
|
Feb 9, 2023.
|
2023-02-02 21:06:34 -03:00
|
|
|
|
|
|
|
[tw]: https://twitter.com/TwitterDev/status/1621026986784337922
|
|
|
|
|
2021-09-27 22:43:00 -03:00
|
|
|
For it to work, you'll need to [create a new Twitter app](https://developer.twitter.com/en/portal/apps/new), and set
|
|
|
|
some environment variables on your pipeline:
|
|
|
|
|
|
|
|
- `TWITTER_CONSUMER_KEY`
|
|
|
|
- `TWITTER_CONSUMER_SECRET`
|
|
|
|
- `TWITTER_ACCESS_TOKEN`
|
|
|
|
- `TWITTER_ACCESS_TOKEN_SECRET`
|
|
|
|
|
2021-12-23 01:52:01 +01:00
|
|
|
Then, you can add something like the following to your `.goreleaser.yaml` config:
|
2021-09-27 22:43:00 -03:00
|
|
|
|
2024-11-29 11:17:45 -03:00
|
|
|
```yaml title=".goreleaser.yaml"
|
2021-09-27 22:43:00 -03:00
|
|
|
announce:
|
|
|
|
twitter:
|
|
|
|
# Whether its enabled or not.
|
|
|
|
enabled: true
|
|
|
|
|
|
|
|
# Message template to use while publishing.
|
2023-04-02 17:16:21 -03:00
|
|
|
#
|
2024-06-19 11:44:22 -03:00
|
|
|
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'.
|
|
|
|
# Templates: allowed.
|
|
|
|
message_template: "Awesome project {{.Tag}} is out!"
|
2021-09-27 22:43:00 -03:00
|
|
|
```
|
|
|
|
|
2024-07-17 10:56:36 -03:00
|
|
|
<!-- md:templates -->
|