A collection of reusable semantic-release plugins for common release pipeline tasks: updating files with the next version, sending Microsoft Teams notifications, overriding release notes, and publishing Maven projects.
- Node.js
^22.14.0 || >=24.10.0 - semantic-release
25or compatible
# pnpm
pnpm add -D @team-internet/semantic-release-plugins
# npm
npm install --save-dev @team-internet/semantic-release-plugins
# yarn
yarn add --dev @team-internet/semantic-release-plugins| Plugin | Subpath | Lifecycle hooks |
|---|---|---|
replace |
@team-internet/semantic-release-plugins/replace |
prepare |
notify |
@team-internet/semantic-release-plugins/notify |
verifyConditions, success |
teams-notify |
@team-internet/semantic-release-plugins/teams-notify |
verifyConditions, success |
notes-override |
@team-internet/semantic-release-plugins/notes-override |
verifyConditions, generateNotes |
maven |
@team-internet/semantic-release-plugins/maven |
verifyConditions, prepare, publish, success |
teams-notify is an alias for notify.
Add any plugin subpath to your semantic-release configuration:
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@team-internet/semantic-release-plugins/replace",
{
"replacements": [
{
"files": ["src/version.js"],
"from": "__VERSION__ = \\\".*\\\"",
"to": "__VERSION__ = \\\"${nextRelease.version}\\\""
}
]
}
],
[
"@team-internet/semantic-release-plugins/notify",
{
"teamsWebhook": "https://example.webhook.office.com/...",
"packageName": "my-service"
}
],
"@semantic-release/github"
]
}Updates file contents during the prepare phase. Supports semantic-release context interpolation in replacement strings (e.g. ${nextRelease.version}, ${nextRelease.channel}).
[
"@team-internet/semantic-release-plugins/replace",
{
"replacements": [
{
"files": ["package.json"],
"from": "\\\"version\\\": \\\".*\\\"",
"to": "\\\"version\\\": \\\"${nextRelease.version}\\\""
}
]
}
]Each object in replacements is passed to replace-in-file. Key behaviours:
from— string values are compiled to global, multiline regular expressions.to— accepts a string, array, or callback. Supports${...}interpolation from semantic-release context.results— optional assertion object. The release fails if the actual replacement results do not match the expectedfiles,hasChanged, or replacement counts. Useful for catching accidental no-ops.
Multiple replacements example:
[
"@team-internet/semantic-release-plugins/replace",
{
"replacements": [
{
"files": ["src/version.js"],
"from": "const VERSION = \\\".*\\\";",
"to": "const VERSION = \\\"${nextRelease.version}\\\";"
},
{
"files": ["Chart.yaml"],
"from": "appVersion: .*",
"to": "appVersion: ${nextRelease.version}"
}
]
}
]Sends a Microsoft Teams notification after a successful release. Both plugin names resolve to the same implementation — use whichever is clearer in your configuration.
[
"@team-internet/semantic-release-plugins/notify",
{
"teamsWebhook": "https://example.webhook.office.com/...",
"packageName": "my-service"
}
]All options can be supplied as plugin config or resolved automatically from environment variables. Environment variables take precedence over plugin config.
| Option | Environment variable | Required |
|---|---|---|
teamsWebhook |
TEAMS_NOTIFICATION_URI |
Yes |
githubToken |
GH_TOKEN, GITHUB_TOKEN |
Yes |
packageName |
SEMANTIC_RELEASE_PACKAGE, npm_package_name, package.json#name |
Yes (auto-resolved from package.json if not set) |
commitSHA |
COMMIT_SHA |
No |
notificationType |
TEAMS_NOTIFICATION_TYPE |
No |
The Teams webhook must be created from the Microsoft Teams Workflows app using the "Send webhook alerts to a channel" template or equivalent. The notification payload uses the Adaptive Card format supported by Workflows webhooks.
Replaces the release notes generated by semantic-release with a fixed string. Useful when notes are produced externally — for example, from a Jira sprint query or a changelog file written by the pipeline before release.
[
"@team-internet/semantic-release-plugins/notes-override",
{
"notes": "See JIRA-1234 for full changelog."
}
]The notes value can also be supplied via the customReleaseNotes environment variable, which takes precedence over the plugin config. Markdown links are stripped from the output before it is returned to semantic-release.
Releases Maven projects from a semantic-release pipeline. The plugin:
- Verifies that
mvn(or./mvnw) is available. - Updates all
pom.xmlfiles to the release version. - Runs the configured Maven publish target.
- Optionally commits the next
-SNAPSHOTversion after a successful publish.
[
"@team-internet/semantic-release-plugins/maven",
{
"mvnw": true,
"settingsPath": "./settings.xml",
"mavenTarget": "deploy",
"processAllModules": true,
"updateSnapshotVersion": true
}
]| Option | Default | Description |
|---|---|---|
mvnw |
false |
Use ./mvnw wrapper instead of the system mvn binary. |
settingsPath |
unset | Path to a Maven settings file, passed as --settings. Allowed characters: word chars, ~, ., /, -. |
mavenTarget |
deploy |
Maven goal(s) to run. One of deploy, package jib:build, or deploy jib:build. |
clean |
true |
Prepend clean to the publish command. |
processAllModules |
false |
Pass -DprocessAllModules when updating pom.xml versions in multi-module builds. |
updateSnapshotVersion |
false |
After a successful release, update pom.xml to the next -SNAPSHOT version and commit. |
snapshotCommitMessage |
chore: setting next snapshot version [skip ci] |
Commit message used for the snapshot version bump. |
opts |
"" |
Additional Maven arguments appended to the publish command, split on spaces. |
debug |
false |
Add Maven -X for verbose build output. |
Minimal example — deploy with Maven wrapper:
[
"@team-internet/semantic-release-plugins/maven",
{
"mvnw": true
}
]Multi-module project with Jib and snapshot update:
[
"@team-internet/semantic-release-plugins/maven",
{
"mvnw": true,
"mavenTarget": "deploy jib:build",
"processAllModules": true,
"updateSnapshotVersion": true,
"snapshotCommitMessage": "chore(release): set next snapshot version [skip ci]"
}
]Set the DEBUG environment variable to the plugin namespace to enable verbose logging:
DEBUG=semantic-release:notify pnpm semantic-release
DEBUG=semantic-release:teams-notify pnpm semantic-release
DEBUG=semantic-release:notes-override pnpm semantic-releaseUse DEBUG=semantic-release:* to enable all plugins simultaneously.
For Maven build output, set "debug": true in the plugin options to pass -X to Maven.
MIT — Team Internet Group PLC