Mastodon
Posts a status to a Mastodon server.
Configuration
Legend:
-
required
-
optional
-
may use environment variable
-
accepts Name Templates
#
announce:
#
mastodon:
# Enables or disables Mastodon.
# 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 `mastodon`, i.e, `mastodonFoo`.
foo: bar
# The Mastodon server.
#
host: https://my.mastodonserver.org
# The access token to use.
#
accessToken: __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/mastodon.tpl
#
[announce.mastodon]
# Enables or disables Mastodon.
# 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 `mastodon`, i.e, `mastodonFoo`.
# The Mastodon server.
#
host = "https://my.mastodonserver.org"
# The access token to use.
#
accessToken = "__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/mastodon.tpl"
{
//
"announce": {
//
"mastodon": {
// Enables or disables Mastodon.
// 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 `mastodon`, i.e, `mastodonFoo`.
"foo": "bar"
},
// The Mastodon server.
//
"host": "https://my.mastodonserver.org",
// The access token to use.
//
"accessToken": "__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/mastodon.tpl"
}
}
}
<jreleaser>
<!--
-->
<announce>
<!--
-->
<mastodon>
<!--
Enables or disables Mastodon.
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 `mastodon`, i.e, `mastodonFoo`.
-->
<foo>bar</foo>
</extraProperties>
<!--
The Mastodon server.
-->
<host>https://my.mastodonserver.org</host>
<!--
The access token to use.
-->
<accessToken>__USE_ENVIRONMENT_VARIABLE__</accessToken>
<!--
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/mastodon.tpl</statusTemplate>
</mastodon>
</announce>
</jreleaser>
jreleaser {
//
announce {
//
mastodon {
// Enables or disables Mastodon.
// 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 `mastodon`, i.e, `mastodonFoo`.
//
extraProperties.put('foo', 'bar')
// The Mastodon server.
//
host = 'https://my.mastodonserver.org'
// The access token to use.
//
accessToken = '__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/mastodon.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.mastodon.active |
JRELEASER_ANNOUNCE_MASTODON_ACTIVE |
host |
|
jreleaser.announce.mastodon.host |
JRELEASER_ANNOUNCE_MASTODON_HOST |
accessToken |
|
jreleaser.announce.mastodon.access.token |
JRELEASER_ANNOUNCE_MASTODON_ACCESS_TOKEN |