Tweets a new release. You must register a new Twitter application and obtain the set of credentials. Follow the instructions from Twitter to complete this task. Note: Remember to set permissions to include Write access and make sure to re-generate access tokens if you changed permissions.
Configuration
Legend:
-
required
-
optional
-
may use environment variable
-
accepts Name Templates
#
announce:
#
twitter:
# Enables or disables Twitter.
# Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
# Defaults to `NEVER`.
#
active: ALWAYS
# Defines the connection timeout in seconds.
# Defaults to `20`.
#
connectTimeout: 20
# Defines the read timeout in seconds.
# Defaults to `60`.
#
readTimeout: 60
# Additional properties used when evaluating templates.
#
extraProperties:
# Key will be capitalized and prefixed with `twitter`, i.e, `twitterFoo`.
foo: bar
# The consumer key.
#
consumerKey: __USE_ENVIRONMENT_VARIABLE__
# The consumer token.
#
consumerSecret: __USE_ENVIRONMENT_VARIABLE__
# The access token.
#
accessToken: __USE_ENVIRONMENT_VARIABLE__
# The access token secret.
#
accessTokenSecret: __USE_ENVIRONMENT_VARIABLE__
# The announcement message.
# Review the available Name Templates.
#
status: '🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'
# The announcement messages.
# Review the available Name Templates.
#
statuses:
- '🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'
- 'New and exciting features added to {{projectNameCapitalized}} {{projectVersion}}'
# Path to a template file that contains a list of statuses.
# Review the available Name Templates.
#
statusTemplate: path/to/template/twitter.tpl
#
[announce.twitter]
# Enables or disables Twitter.
# Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
# Defaults to `NEVER`.
#
active = "ALWAYS"
# Defines the connection timeout in seconds.
# Defaults to `20`.
#
connectTimeout = 20
# Defines the read timeout in seconds.
# Defaults to `60`.
#
readTimeout = 60
# Additional properties used when evaluating templates.
#
extraProperties.foo = "bar"
# Key will be capitalized and prefixed with `twitter`, i.e, `twitterFoo`.
# The consumer key.
#
consumerKey = "__USE_ENVIRONMENT_VARIABLE__"
# The consumer token.
#
consumerSecret = "__USE_ENVIRONMENT_VARIABLE__"
# The access token.
#
accessToken = "__USE_ENVIRONMENT_VARIABLE__"
# The access token secret.
#
accessTokenSecret = "__USE_ENVIRONMENT_VARIABLE__"
# The announcement message.
# Review the available Name Templates.
#
status = "🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}"
# The announcement message.
# Review the available Name Templates.
#
statuses = ["🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}", "New and exciting featurer added to {{projectNameCapitalized}} {{projectVersion}}"]
# Path to a template file that contains a list of statuses.
# Review the available Name Templates.
#
statusTemplate = "path/to/template/twitter.tpl"
{
//
"announce": {
//
"twitter": {
// Enables or disables Twitter.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
// Defaults to `NEVER`.
//
"active": "ALWAYS",
// Defines the connection timeout in seconds.
// Defaults to `20`.
//
"connectTimeout": 20,
// Defines the read timeout in seconds.
// Defaults to `60`.
//
"readTimeout": 60,
// Additional properties used when evaluating templates.
//
"extraProperties": {
// Key will be capitalized and prefixed with `twitter`, i.e, `twitterFoo`.
"foo": "bar"
},
// The consumer key.
//
"consumerKey": "__USE_ENVIRONMENT_VARIABLE__",
// The consumer token.
//
"consumerSecret": "__USE_ENVIRONMENT_VARIABLE__",
// The access token.
//
"accessToken": "__USE_ENVIRONMENT_VARIABLE__",
// The access token secret.
//
"accessTokenSecret": "__USE_ENVIRONMENT_VARIABLE__",
// The announcement message.
// Review the available Name Templates.
//
"status": "🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}"
// The announcement message.
// Review the available Name Templates.
//
"statuses": [
"🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}",
"New and exciting featurer added to {{projectNameCapitalized}} {{projectVersion}}"
],
// Path to a template file that contains a list of statuses.
// Review the available Name Templates.
//
"statusTemplate": "path/to/template/twitter.tpl"
}
}
}
<jreleaser>
<!--
-->
<announce>
<!--
-->
<twitter>
<!--
Enables or disables Twitter.
Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
Defaults to `NEVER`.
-->
<active>ALWAYS</active>
<!--
Defines the connection timeout in seconds.
Defaults to `20`.
-->
<connectTimeout>20</connectTimeout>
<!--
Defines the read timeout in seconds.
Defaults to `60`.
-->
<readTimeout>60</readTimeout>
<!--
Additional properties used when evaluating templates.
-->
<extraProperties>
<!--
Key will be capitalized and prefixed with `twitter`, i.e, `twitterFoo`.
-->
<foo>bar</foo>
</extraProperties>
<!--
The consumer key.
-->
<consumerKey>__USE_ENVIRONMENT_VARIABLE__</consumerKey>
<!--
The consumer token.
-->
<consumerSecret>__USE_ENVIRONMENT_VARIABLE__</consumerSecret>
<!--
The access token.
-->
<accessToken>__USE_ENVIRONMENT_VARIABLE__</accessToken>
<!--
The access token secret.
-->
<accessTokenSecret>__USE_ENVIRONMENT_VARIABLE__</accessTokenSecret>
<!--
The announcement message.
Review the available Name Templates.
-->
<status>🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}</status>
<!--
The announcement message.
Review the available Name Templates.
-->
<statuses>
<status>🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}</status>
<status>New and exciting featurer added to {{projectNameCapitalized}} {{projectVersion}}</status>
</statuses>
<!-- Path to a template file that contains a list of statuses.
Review the available Name Templates.
-->
<statusTemplate>path/to/template/twitter.tpl</statusTemplate>
</twitter>
</announce>
</jreleaser>
jreleaser {
//
announce {
//
twitter {
// Enables or disables Twitter.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
// Defaults to `NEVER`.
//
active = 'ALWAYS'
// Defines the connection timeout in seconds.
// Defaults to `20`.
//
connectTimeout = 20
// Defines the read timeout in seconds.
// Defaults to `60`.
//
readTimeout = 60
// Additional properties used when evaluating templates.
// Key will be capitalized and prefixed with `twitter`, i.e, `twitterFoo`.
//
extraProperties.put('foo', 'bar')
// The consumer key.
//
consumerKey = '__USE_ENVIRONMENT_VARIABLE__'
// The consumer token.
//
consumerSecret = '__USE_ENVIRONMENT_VARIABLE__'
// The access token.
//
accessToken = '__USE_ENVIRONMENT_VARIABLE__'
// The access token secret.
//
accessTokenSecret = '__USE_ENVIRONMENT_VARIABLE__'
// The announcement message.
// Review the available Name Templates.
//
status = '🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'
// The announcement message.
// Review the available Name Templates.
//
statuses = [
'🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}',
'New and exciting featurer added to {{projectNameCapitalized}} {{projectVersion}}'
]
// Path to a template file that contains a list of statuses.
// Review the available Name Templates.
//
statusTemplate = 'path/to/template/twitter.tpl'
}
}
}
Environment
When not explicitly set, the value of the following properties may be resolved from an environment variable or a system property as shown in the table. The system property takes precedence over the environment variable.
System Property | Environment Variable |
---|---|
active |
|
jreleaser.announce.twitter.active |
JRELEASER_ANNOUNCE_TWITTER_ACTIVE |
consumerKey |
|
jreleaser.announce.twitter.consumer.key |
JRELEASER_ANNOUNCE_TWITTER_CONSUMER_KEY |
consumerSecret |
|
jreleaser.announce.twitter.consumer.secret |
JRELEASER_ANNOUNCE_TWITTER_CONSUMER_SECRET |
accessToken |
|
jreleaser.announce.twitter.access.token |
JRELEASER_ANNOUNCE_TWITTER_ACCESS_TOKEN |
accessTokenSecret |
|
jreleaser.announce.twitter.access.token.secret |
JRELEASER_ANNOUNCE_TWITTER_ACCESS_TOKEN_SECRET |