A Semantic Release plugin that uses the Jira REST API to create a Jira Release. It will also associate any Jira issues referenced in commit message with the release.
npm install -D semantic-release-jira-release-generator
This plugin can be configured in the Semantic Release Configuration file like so:
{
"plugins": [
"@semantic-release/commit-analyzer",
["semantic-release-jira-release-generator", {
"jiraHost": "https://<jira-host-name>",
"jiraProjectKey": "ABC",
"jiraReleaseNameTemplate": "v${version}" // optional
}]
]
}
jiraReleaseNameTemplate
is optional but if provided, must include the string ${version}
, which will be evaluated to the version dirived by Semantic Release. If not provided, it will default to ${version}
.
Currently this semantic release plugin only supports PAT (personal access token) as a means of authentication with Jira. Please follow Atlassian's guide on creating PAT tokens.
The token must be provided to this plugin by setting it as the following environment variable
export JIRA_PAT_TOKEN=<personal-access-token-here>
This has only been tested with Jira Software Data Center (9.12.x). It has not been tested with Atlassian's Cloud offering of Jira
This plugin does not support Basic Auth as a means of authenticating with Jira, but this functionality could be added if there was appetite.