Skip to content

Social Configuration ​

Options of the release posts on Twitter (X), Slack and Microsoft Teams - enabling, prereleases, templates and their variables, credentials, Slack format and length, Teams cards and announcements.

Setup of the platforms, shape of the posts and troubleshooting: Social Media. In relizy release, the posts also need release.social (true by default). The credentials can come from the environment or from tokens.

ts
import { defineConfig } from 'relizy'

export default defineConfig({
  social: {
    changelogUrl: 'https://my-lib.dev/changelog',
    twitter: { enabled: true },
    slack: { enabled: true, changelog: 'full' },
    teams: { enabled: true, cards: 'release' },
  },
})

twitter ​

enabled ​

  • Type: boolean
  • Default: false

Post the releases on Twitter (X). Requires twitter-api-v2.

onlyStable ​

  • Type: boolean
  • Default: true

Do not announce the prereleases (alpha, beta, rc...). A post announcing several versions leaves its prereleases out, and nothing is posted when every version is a prerelease. A release of prereleases only (--prerelease, --prepatch, --preminor, --premajor) does not check the credentials of the platform either.

template ​

  • Type: string
  • Default: templates.twitterMessage: '📣 {{releaseTitle}}\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'

Text of the tweet, with the template variables. {{changelog}} gets the space the rest of the template leaves within postMaxLength.

postMaxLength ​

  • Type: number
  • Default: 280

Maximum length of the tweet, counted as X counts it: a URL counts 23 characters, an emoji or a CJK character counts 2.

credentials ​

  • Type: { apiKey?: string, apiKeySecret?: string, accessToken?: string, accessTokenSecret?: string }
  • Default: tokens.twitter, read from the environment

The apiKey, apiKeySecret, accessToken and accessTokenSecret of the X app. Each field set here overrides the one of tokens.twitter.

exclude ​

  • Type: { groups?: string[], packages?: string[] }

Versions left out of the tweet: the version groups by name, the packages by name or glob (@scope/*). Nothing is posted when every version is left out.

slack ​

enabled ​

  • Type: boolean
  • Default: false

Post the releases on Slack, through a webhook or a bot token.

onlyStable ​

  • Type: boolean
  • Default: true

Same as twitter.onlyStable.

webhookUrl ​

  • Type: string
  • Default: RELIZY_SLACK_WEBHOOK_URL, else SLACK_WEBHOOK_URL

Incoming Webhook of the channel. When a webhook URL is set, it is used even if a token is set (the token and channel are ignored, with a warning), and @slack/web-api is not needed.

channel ​

  • Type: string

Channel of the bot token mode, by name (#releases) or by ID (C1234567890). Required in this mode, ignored with a webhook.

credentials ​

  • Type: { token?: string }
  • Default: tokens.slack, read from the environment

token: the Bot User OAuth Token (xoxb-...), with the chat:write scope. Requires @slack/web-api and channel.

changelog ​

  • Type: 'full' | 'summary' | 'none' | false

  • Default: 'summary'

  • CLI: --slack-format <format> of relizy social and relizy release

  • full: the commit bodies (following changelog.includeCommitBody) and the PR and issue links, as Slack rich text, cut to the limits of Slack.

  • summary: the commit titles, in a single mrkdwn block.

  • none (or false): no changelog, the buttons of the message link to it.

Named changelogFormat before relizy 2, see the migration guide.

postMaxLength ​

  • Type: number
  • Default: 2500 in summary format, no limit in full format

Maximum length of the changelog in the message. Beyond, summary drops the last commits, full cuts the changelog where the limit is reached (even inside a commit body); the commits left out are announced with an "… and N more changes" line. In summary format, a block never exceeds the 3000 characters of Slack.

template ​

Text of the message, in Slack mrkdwn (*bold*, <url|text>), with the template variables. The message is then a single block of at most 3000 characters. Without template, the header of the rich blocks is 📣 {{releaseTitle}}.

noAuthors ​

  • Type: boolean
  • Default: false

Hide the contributors on Slack. The global noAuthors hides them everywhere, whatever this option.

noPackages ​

  • Type: boolean
  • Default: false

Hide the block listing the released packages with their old and new versions.

announcements ​

  • Type: ({ group: string } | { package: string } & { title?, message?, changelogUrl?, links? })[]

The versions to announce and their texts, as teams.announcements. Without it, every version is announced and the message is unchanged. With it, only the versions matching an entry, each with:

  • title: replaces the name of the version (its version stays shown): the title of its section, the name of its package line, or the header 📣 <title> <version> is out! for a single version.
  • message: markdown, under the title.
  • the links 📖 Release notes, 📝 Changelog (changelogUrl, false removes it) and links, under the message. For a single version, they replace the buttons 📦 View Release and 📋 Full Changelog.

The texts and the links take the announcement variables. With a template, only the title applies to a single version, through {{releaseTitle}}. See Announcements on Slack.

exclude ​

  • Type: { groups?: string[], packages?: string[] }

Versions never announced on Slack, even when an entry of announcements matches them: the groups by name, the packages by name or glob. Nothing is posted when every version is left out.

teams ​

The cards posted to a Teams workflow. Setup of the workflow: Microsoft Teams.

enabled ​

  • Type: boolean
  • Default: false

Post the releases on Teams.

onlyStable ​

  • Type: boolean
  • Default: true

Same as twitter.onlyStable.

webhookUrl ​

  • Type: string
  • Default: RELIZY_TEAMS_WEBHOOK_URL, else TEAMS_WEBHOOK_URL, else the base64 of RELIZY_TEAMS_WEBHOOK_URL_B64, else of TEAMS_WEBHOOK_URL_B64

URL of the workflow, with the trigger When a Teams webhook request is received. It holds a secret (its sig parameter): prefer the environment. The URLs of the retired Office 365 connectors are refused.

cards ​

  • Type: 'version' | 'release'

  • Default: 'version'

  • version: one card per version, the root version of a unified/selective group and each package of an independent group.

  • release: one card for the release, with a section per version under the title of its group.

changelog ​

  • Type: 'full' | 'summary' | 'none' | false

  • Default: 'none'

  • full: the changelog of the version, the commit bodies included.

  • summary: the titles of the commits of the version, rewritten with ai.social.teams.

  • none (or false): no changelog in the card, its buttons link to it.

A card is at most 28 KB: the changelogs of a card share what its other texts leave, each one cut between two changes with an … and N more changes line.

title ​

  • Type: string
  • Default: {{name}} {{newVersion}}

Title of the card (of its section with cards: 'release'), with the announcement variables.

message ​

  • Type: string
  • Default: A new version of {{name}} is available.

Text under the title, in markdown (bold, italic, links, lists), with the announcement variables.

changelogUrl ​

  • Type: string | false
  • Default: social.changelogUrl, else the CHANGELOG.md of the version at its tag

URL of the 📝 Changelog button, with the announcement variables. false removes the button.

  • Type: { title: string, url: string }[]

Buttons added after 📖 Release notes and 📝 Changelog, with the announcement variables in their title and URL. A button whose URL is empty is left out.

ts
links: [{ title: '🎨 Storybook', url: 'https://{{shortName}}.acme.dev' }]

badge ​

  • Type: string | false
  • Default: 'New release' ('Prerelease' for a prerelease)

Text of the badge above the title; false removes it.

locale ​

  • Type: string
  • Default: 'en-US'

Locale of the date of the card (fr-FR gives 6 novembre 2026).

announcements ​

  • Type: ({ group: string } | { package: string } & { title?, message?, changelogUrl?, links? })[]

The versions to announce and their texts. Without it, every version is announced with the options above. With it, only the versions matching an entry:

  • { group }: the versions of a version group, its root version or each of its packages when it is independent.
  • { package }: the packages whose name matches the glob (@scope/*), and the version of a project without monorepo under its name. Its fields override the ones of its group entry, field by field.

The fields of an entry override the ones of social.teams. See Announcements.

exclude ​

  • Type: { groups?: string[], packages?: string[] }

Versions never announced, even when an entry of announcements matches them: the groups by name, the packages by name or glob.

Announcement Variables ​

The texts and the links of the announcements (Teams, and slack.announcements) replace these variables, for each version:

VariableValue
{{name}}The package name; the project name (the title of the group with version groups) for a root version
{{shortName}}name without its scope: ui for @acme/ui
{{newVersion}}The version
{{tag}}Its tag
{{groupTitle}}The title of its version group, empty without version groups
{{projectName}}projectName of the config, else the name of the root package.json
{{releaseUrl}}Its GitHub/GitLab release
{{changelogUrl}}The URL of its 📝 Changelog link

changelogUrl ​

  • Type: string

URL of the full changelog: {{changelogUrl}} of the templates, the Full Changelog button of Slack and the 📝 Changelog button of Teams. Not set, the variable is empty, and a template line holding only {{changelogUrl}} is removed.

Templates ​

social.twitter.template falls back to templates.twitterMessage, and social.slack.template to templates.slackMessage: set the templates ones to share them between several configs. See Commit Templates.

Template Variables ​

Every occurrence of a variable is replaced. A URL not known is replaced with an empty string, and a line holding only this URL is removed.

VariableValueSlack only
{{releaseTitle}}<name> <version> is out! when a single version is released (the root version, or a single package of an independent release), New releases of <projectName> otherwise
{{projectName}}projectName of the config, else the name of the root package.json
{{newVersion}}The version released, empty when several versions are released
{{packageList}}name@version of the released packages, comma-separated
{{packageCount}}Number of released packages
{{changelog}}The changelog, fitted to the post; the sections of the versions when several are released
{{releaseUrl}}The GitHub/GitLab release of the only version, else of the unified/selective group
{{changelogUrl}}social.changelogUrl
{{contributors}}Names of the contributors, one bullet each (empty with noAuthors)Yes
{{packages}}Released packages with their old and new versions, one bullet each (empty with noPackages)Yes

Use {{releaseTitle}} rather than {{projectName}} {{newVersion}}: it stays right when a release ships several versions.

Version Groups ​

A version group with release: { social: false } is left out of the posts. The social options are global: one post per platform announces every group (Teams posts a card per version, or one with cards: 'release'). The announcements of Teams and Slack choose the versions and set the texts of each group, exclude leaves versions out of Teams, Slack and Twitter.

ts
export default defineConfig({
  monorepo: {
    groups: [
      { name: 'main', versionMode: 'selective', packages: ['packages/*'] },
      { name: 'internal', versionMode: 'independent', packages: ['internal/*'], release: { social: false } },
    ],
  },
  social: { slack: { enabled: true } },
})