OpenCollective

Posts an update to an OpenCollective page. You must create a personal token with the update scope set. Head to https://opencollective.com/<user>/admin/for-developers for instructions.

Configuration

Legend:

  • required

  • optional

  • may use environment variable

  • accepts Name Templates

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

# 
announce:
  # 
  openCollective:
    # Enables or disables OpenCollective.
    # 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 `openCollective`, i.e, `openCollectiveFoo`.
      foo: bar

    # The collective slug to use.
    # If left unspecified, the `JRELEASER_OPENCOLLECTIVE_SLUG`
    # environment variable must be defined.
    # Defaults to the project's name.
    #  
    slug: app

    # The token associated with the given slug.
    # If left unspecified, the `JRELEASER_OPENCOLLECTIVE_TOKEN`
    # environment variable must be defined.
    #  
    token: __USE_ENVIRONMENT_VARIABLE__

    # The message's title.
    # Review the available Name Templates.
    #  
    title: '{{projectNameCapitalized}} {{projectVersion}} released!'

    # The announcement message.
    # Review the available Name Templates.
    #  
    message: '{{#f_md2html}}🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! [{{releaseNotesUrl}}]({{releaseNotesUrl}}){{/f_md2html}}'

    # Path to a template file that contains the message.
    # Review the available Name Templates.
    # Defaults to `src/jreleaser/templates/opencollective.tpl`.
    # 
    messageTemplate: path/to/template/opencollective.tpl
# 
[announce.openCollective]
  # Enables or disables OpenCollective.
  # 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 `openCollective`, i.e, `openCollectiveFoo`.

  # The collective slug to use.
  # If left unspecified, the `JRELEASER_OPENCOLLECTIVE_SLUG`
  # environment variable must be defined.
  # Defaults to the project's name.
  #  
  slug = "app"

  # The token associated with the given slug.
  # If left unspecified, the `JRELEASER_OPENCOLLECTIVE_TOKEN`
  # environment variable must be defined.
  #  
  token = "__USE_ENVIRONMENT_VARIABLE__"

  # The message's title.
  # Review the available Name Templates.
  #  
  title = "{{projectNameCapitalized}} {{projectVersion}} released!"

  # The announcement message.
  # Review the available Name Templates.
  #  
  message = "{{#f_md2html}}🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! [{{releaseNotesUrl}}]({{releaseNotesUrl}}){{/f_md2html}}"

  # Path to a template file that contains the message.
  # Review the available Name Templates.
  # Defaults to `src/jreleaser/templates/opencollective.tpl`.
  # 
  messageTemplate = "path/to/template/opencollective.tpl"
{
  // 
  "announce": {
    // 
    "openCollective": {
      // Enables or disables OpenCollective.
      // 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 `openCollective`, i.e, `openCollectiveFoo`.
        "foo": "bar"
      },

      // The collective slug to use.
      // If left unspecified, the `JRELEASER_OPENCOLLECTIVE_SLUG`
      // environment variable must be defined.
      // Defaults to the project's name.
      //  
      "slug": "app",

      // The token associated with the given slug.
      // If left unspecified, the `JRELEASER_OPENCOLLECTIVE_TOKEN`
      // environment variable must be defined.
      //  
      "token": "__USE_ENVIRONMENT_VARIABLE__",

      // The message's title.
      // Review the available Name Templates.
      // 
      "title": "{{projectNameCapitalized}} {{projectVersion}} released!",

      // The announcement message.
      // Review the available Name Templates.
      //  
      "message": "{{#f_md2html}}🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! [{{releaseNotesUrl}}]({{releaseNotesUrl}}){{/f_md2html}}",

      // Path to a template file that contains the message.
      // Review the available Name Templates.
      // Defaults to `src/jreleaser/templates/opencollective.tpl`.
      // 
      "messageTemplate": "path/to/template/opencollective.tpl"
    }
  }
}
<jreleaser>
  <!--
    
  -->
  <announce>
    <!--
      
    -->
    <openCollective>
      <!--
        Enables or disables OpenCollective.
        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 `openCollective`, i.e, `openCollectiveFoo`.
        -->
        <foo>bar</foo>
      </extraProperties>

      <!--
        The collective slug to use.
        If left unspecified, the `JRELEASER_OPENCOLLECTIVE_SLUG`
        environment variable must be defined.
        Defaults to the project's name.
         
      -->
      <slug>app</slug>

      <!--
        The token associated with the given slug.
        If left unspecified, the `JRELEASER_OPENCOLLECTIVE_TOKEN`
        environment variable must be defined.
         
      -->
      <token>__USE_ENVIRONMENT_VARIABLE__</token>

      <!--
        The message's title.
        Review the available Name Templates.
        
      -->
      <title>{{projectNameCapitalized}} {{projectVersion}} released!</title>

      <!--
        The announcement message.
        Review the available Name Templates.
         
      -->
      <message>{{#f_md2html}}🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! [{{releaseNotesUrl}}]({{releaseNotesUrl}}){{/f_md2html}}</message>

      <!--
        Path to a template file that contains the message.
        Review the available Name Templates.
        Defaults to `src/jreleaser/templates/opencollective.tpl`.
        
      -->
      <messageTemplate>path/to/template/opencollective.tpl</messageTemplate>
    </openCollective>
  </announce>
</jreleaser>
jreleaser {
  // 
  announce {
    // 
    openCollective {
      // Enables or disables OpenCollective.
      // 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 `openCollective`, i.e, `openCollectiveFoo`.
      //  
      extraProperties.put('foo', 'bar')

      // The collective slug to use.
      // If left unspecified, the `JRELEASER_OPENCOLLECTIVE_SLUG`
      // environment variable must be defined.
      // Defaults to the project's name.
      //  
      slug = 'app'

      // The token associated with the given slug.
      // If left unspecified, the `JRELEASER_OPENCOLLECTIVE_TOKEN`
      // environment variable must be defined.
      //  
      token = '__USE_ENVIRONMENT_VARIABLE__'

      // The message's title.
      // Review the available Name Templates.
      // 
      title = '{{projectNameCapitalized}} {{projectVersion}} released!'

      // The announcement message.
      // Review the available Name Templates.
      //  
      message = '{{#f_md2html}}🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! [{{releaseNotesUrl}}]({{releaseNotesUrl}}){{/f_md2html}}'

      // Path to a template file that contains the message.
      // Review the available Name Templates.
      // Defaults to `src/jreleaser/templates/opencollective.tpl`.
      // 
      messageTemplate = 'path/to/template/opencollective.tpl'
    }
  }
}

You may define either message or messageTemplate, with the former taking precedence over the latter.

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.opencollective.active

JRELEASER_ANNOUNCE_OPENCOLLECTIVE_ACTIVE

slug

jreleaser.announce.opencollective.slug
jreleaser.opencollective.slug

JRELEASER_ANNOUNCE_OPENCOLLECTIVE_SLUG
JRELEASER_OPENCOLLECTIVE_SLUG

token

jreleaser.announce.opencollective.token
jreleaser.opencollective.token

JRELEASER_ANNOUNCE_OPENCOLLECTIVE_TOKEN
JRELEASER_OPENCOLLECTIVE_TOKEN

Templates

The default location for templates is:

src/jreleaser/templates

The following list shows the filenames that may be used to override default templates:

  • opencollective.tpl

Templates may be initialized using the template command