GitHub
Configure releases to https://api.github.com.
Refer to Changelog for full options on changelog customizations.
You must define a value for both host and apiEndpoint if using GitHub Enterprise.
|
Configuration
Legend:
-
required
-
optional
-
may use environment variable
-
accepts Name Templates
#
release:
# Repo in which the release will be created.
#
github:
# Disables or enables publication to GitHub.
# defaults to `true`.
#
enabled: true
# Defines the connection timeout in seconds.
# Defaults to `20`.
#
connectTimeout: 20
# Defines the read timeout in seconds.
# Defaults to `60`.
#
readTimeout: 60
# The user or organization that owns the repository.
#
owner: duke
# The name of the repository.
# If unspecified, will use `#{project.name}`.
#
name: app
# The GitHub host url.
#
host: github.com
# Username used for authoring commits. Must have write access to the repository.
# Defaults to the repository's owner.
#
username: duke
# Password or OAuth token with write access to the repository.
#
token: __DO_NOT_SET_HERE__
# The GitHub API endpoint to use.
# You can skip `/api/v1` as it will be added by default.
#
apiEndpoint: https://api.github.com
# The tag associated with the release.
# If left unspecified, will use `v{{projectVersion}}`.
#
tagName: v1.0.0
# The tag to compare against the release tag. Is used to fetch all commits between those tags.
# If left unspecified, will use the previous logical tag of `tagName`.
#
previousTagName: v0.9.0
# The name of the release.
# If left unspecified, will use `Release {{tagName}}`.
#
releaseName: Release v1.0.0
# Drops and creates an existing release with matching tag.
# Defaults to `false`.
#
overwrite: true
#
update:
# Appends artifacts to an existing release with matching tag,
# useful if `overwrite` is set to `false`.
# Defaults to `false`.
#
enabled: true
# Release sections to be updated.
# Supported values are [`TITLE`, `BODY`, `ASSETS`].
# Defaults to `ASSETS`.
#
sections:
- ASSETS
# Skips creating a tag.
# Useful when the tag was created externally.
# Defaults to `false`.
#
skipTag: false
# Skips creating a release.
# Useful when release assets will be handled with an uploader.
# Defaults to `false`.
#
skipRelease: false
# Signs commits with the configured credentials.
# The Signing section must be configured as well.
# Defaults to `false`.
#
sign: false
# The target branch to pull from.
# Defaults to the branch pointed by HEAD.
#
branch: main
# The target branch to push to.
# Defaults to the branch pointed by `#{branch}`.
#
branchPush: '{{projectName}}-{{tagName}}'
# Enables or disables asset upload.
# Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`, `PRERELEASE`, `RELEASE_PRERELEASE`].
# Defaults to `ALWAYS`.
#
uploadAssets: ALWAYS
# Release files.
# Defaults to `true`.
#
files: true
# Release distribution artifacts.
# Defaults to `true`.
#
artifacts: true
# Release checksum files.
# Defaults to `true`.
#
checksums: true
# Release signature files.
# Defaults to `true`.
#
signatures: true
# Release catalog files.
# Defaults to `true`.
#
catalogs: true
# Marks the release as a draft.
# Defaults to `false`.
#
draft: false
#
prerelease:
# Marks the release as prerelease.
# Defaults to `false`.
#
enabled: false
# A regex to determine if the project version is a prerelease
#
pattern: .*-pre
# Links the release with a discussion.
# The named category must exist.
# Defaults to empty.
#
discussionCategoryName: Announcements
# Git author used to commit to the repository.
#
commitAuthor:
# Name used when authoring commits.
# Defaults to `jreleaserbot`.
#
name: jreleaserbot
# E-mail used when authoring commits.
# Defaults to `jreleaser@kordamp.org`.
#
email: jreleaser@kordamp.org
#
releaseNotes:
# Generate release notes using GitHub's native support.
# Defaults to `false`.
#
enabled: false
# Configuration settings used for generating the release notes.
#
configurationFile: .github/custom_release_config.yml
# A milestone associated with the release
#
milestone:
# Close the milestone (if it exists and still open) upon release.
# Defaults to `true`.
#
close: true
# The name/title of the milestone.
# May define a `JRELEASER_MILESTONE_NAME` environment variable instead.
# Defaults to `{{tagName}}`.
#
name: '{{tagName}}'
# Update issues upon release.
# Adds a label and post a comment to every issue found in the changelog.
#
issues:
# Enables this feature.
# Defaults to `false`.
#
enabled: true
# Comment to post on matching issues.
#
comment: '🎉 This issue has been resolved in `{{tagName}}` ([Release Notes]({{releaseNotesUrl}}))'
# Applies the current milestone to issues
# Valid values are: [`NEVER`, `ALWAYS`, `WARN`, `FORCE`].
#
applyMilestone: ALWAYS
# Describes the label to be applied.
# Defaults are shown.
#
label:
#
name: released
#
color: '#FF0000'
#
description: Issue has been released
# The following properties define URL formats.
# Defaults are shown.
# Review the available Name Templates.
#
repoUrl: https://{{repoHost}}/{{repoOwner}}/{{repoName}}
#
repoCloneUrl: https://{{repoHost}}/{{repoOwner}}/{{repoName}}.git
#
commitUrl: https://{{repoHost}}/{{repoOwner}}/{{repoName}}/commits
#
srcUrl: https://{{repoHost}}/{{repoOwner}}/{{repoName}}/{gitservice_blob}/{{repoBranch}}
#
downloadUrl: https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/download/{{tagName}}/{{artifactFile}}
#
releaseNotesUrl: https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/tag/{{tagName}}
#
latestReleaseUrl: https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/latest
#
issueTrackerUrl: https://{{repoHost}}/{{repoOwner}}/{{repoName}}/issues
# Repo in which the release will be created.
#
[release.github]
# Disables or enables publication to GitHub.
# defaults to `true`.
#
enabled = true
# Defines the connection timeout in seconds.
# Defaults to `20`.
#
connectTimeout = 20
# Defines the read timeout in seconds.
# Defaults to `60`.
#
readTimeout = 60
# The user or organization that owns the repository.
#
owner = "duke"
# The name of the repository.
# If unspecified, will use `#{project.name}`.
#
name = "app"
# The GitHub host url.
#
host = "github.com"
# Username used for authoring commits. Must have write access to the repository.
# Defaults to the repository's owner.
#
username = "duke"
# Password or OAuth token with write access to the repository.
#
token = "__DO_NOT_SET_HERE__"
# The GitHub API endpoint to use.
# You can skip `/api/v1` as it will be added by default.
#
apiEndpoint = "https://api.github.com"
# The tag associated with the release.
# If left unspecified, will use `v{{projectVersion}}`.
#
tagName = "v1.0.0"
# The tag to compare against the release tag. Is used to fetch all commits between those tags.
# If left unspecified, will use the previous logical tag of `tagName`.
#
previousTagName = "v0.9.0"
# The name of the release.
# If left unspecified, will use `Release {{tagName}}`.
#
releaseName = "Release v1.0.0"
# Drops and creates an existing release with matching tag.
# Defaults to `false`.
#
overwrite = true
#
[release.github.update]
# Appends artifacts to an existing release with matching tag,
# useful if `overwrite` is set to `false`.
# Defaults to `false`.
#
enabled = true
# Release sections to be updated.
# Supported values are [`TITLE`, `BODY`, `ASSETS`].
# Defaults to `ASSETS`.
#
sections = ["ASSETS"]
# Skips creating a tag.
# Useful when the tag was created externally.
# Defaults to `false`.
#
skipTag = false
# Skips creating a release.
# Useful when release assets will be handled with an uploader.
# Defaults to `false`.
#
skipRelease = false
# Signs commits with the configured credentials.
# The Signing section must be configured as well.
# Defaults to `false`.
#
sign = false
# The target branch to pull from.
# Defaults to the branch pointed by HEAD.
#
branch = "main"
# The target branch to push to.
# Defaults to the branch pointed by `#{branch}`.
#
branchPush = "{{projectName}}-{{tagName}}"
# Enables or disables asset upload.
# Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`, `PRERELEASE`, `RELEASE_PRERELEASE`].
# Defaults to `ALWAYS`.
#
uploadAssets = "ALWAYS"
# Release files.
# Defaults to `true`.
#
files = true
# Release distribution artifacts.
# Defaults to `true`.
#
artifacts = true
# Release checksum files.
# Defaults to `true`.
#
checksums = true
# Release signature files.
# Defaults to `true`.
#
signatures = true
# Release catalog files.
# Defaults to `true`.
#
catalogs = true
# Marks the release as a draft.
# Defaults to `false`.
#
draft = false
# Marks the release as prerelease.
# Defaults to `false`.
#
prerelease.enabled = false
# A regex to determine if the project version is a prerelease
#
prerelease.pattern = .*-pre
# Links the release with a discussion.
# The named category must exist.
# Defaults to empty.
#
discussionCategoryName = "Announcements"
# Git author used to commit to the repository.
# Name used when authoring commits.
# Defaults to `jreleaserbot`.
#
commitAuthor.name = "jreleaserbot"
# E-mail used when authoring commits.
# Defaults to `jreleaser@kordamp.org`.
#
commitAuthor.email = "jreleaser@kordamp.org"
# Generate release notes using GitHub's native support.
# Defaults to `false`.
#
releaseNotes.enabled: false
# Configuration settings used for generating the release notes.
#
releaseNotes.configurationFile: ".github/custom_release_config.yml"
# A milestone associated with the release
# Close the milestone (if it exists and still open) upon release.
# Defaults to `true`.
#
milestone.close = true
# The name/title of the milestone.
# May define a `JRELEASER_MILESTONE_NAME` environment variable instead.
# Defaults to `{{tagName}}`.
#
milestone.name = "{{tagName}}"
# Update issues upon release.
# Adds a label and post a comment to every issue found in the changelog.
# Enables this feature.
# Defaults to `false`.
#
issues.enabled = true
# Comment to post on matching issues.
#
issues.comment = "🎉 This issue has been resolved in `{{tagName}}` ([Release Notes]({{releaseNotesUrl}}))"
# Applies the current milestone to issues
# Valid values are: [`NEVER`, `ALWAYS`, `WARN`, `FORCE`].
#
issues.applyMilestone = "ALWAYS"
# Describes the label to be applied.
# Defaults are shown.
#
issues.label.name = "released"
#
issues.label.namecolor = "#FF0000"
#
issues.label.description = "Issue has been released"
# The following properties define URL formats.
# Defaults are shown.
# Review the available Name Templates.
#
repoUrl = "https://{{repoHost}}/{{repoOwner}}/{{repoName}}"
#
repoCloneUrl = "https://{{repoHost}}/{{repoOwner}}/{{repoName}}.git"
#
commitUrl = "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/commits"
#
srcUrl = "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/{gitservice_blob}/{{repoBranch}}"
#
downloadUrl = "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/download/{{tagName}}/{{artifactFile}}"
#
releaseNotesUrl = "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/tag/{{tagName}}"
#
latestReleaseUrl = "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/latest"
#
issueTrackerUrl = "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/issues"
{
//
"release": {
// Repo in which the release will be created.
//
"github": {
// Disables or enables publication to GitHub.
// defaults to `true`.
//
"enabled": true,
// Defines the connection timeout in seconds.
// Defaults to `20`.
//
"connectTimeout": 20,
// Defines the read timeout in seconds.
// Defaults to `60`.
//
"readTimeout": 60,
// The user or organization that owns the repository.
//
"owner": "duke",
// The name of the repository.
// If unspecified, will use `#{project.name}`.
//
"name": "app",
// The GitHub host url.
//
"host": "github.com",
// Username used for authoring commits. Must have write access to the repository.
// Defaults to the repository's owner.
//
"username": "duke",
// Password or OAuth token with write access to the repository.
//
"token": "__DO_NOT_SET_HERE__",
// The GitHub API endpoint to use.
// You can skip `/api/v1` as it will be added by default.
//
"apiEndpoint": "https://api.github.com",
// The tag associated with the release.
// If left unspecified, will use `v{{projectVersion}}`.
//
"tagName": "v1.0.0",
// The tag to compare against the release tag. Is used to fetch all commits between those tags.
// If left unspecified, will use the previous logical tag of `tagName`.
//
"previousTagName": "v0.9.0",
// The name of the release.
// If left unspecified, will use `Release {{tagName}}`.
//
"releaseName": "Release v1.0.0",
// Drops and creates an existing release with matching tag.
// Defaults to `false`.
//
"overwrite": true,
//
"update": {
// Appends artifacts to an existing release with matching tag,
// useful if `overwrite` is set to `false`.
// Defaults to `false`.
//
"enabled": true,
// Release sections to be updated.
// Supported values are [`TITLE`, `BODY`, `ASSETS`].
// Defaults to `ASSETS`.
//
"sections": ["ASSETS"]
},
// Skips creating a tag.
// Useful when the tag was created externally.
// Defaults to `false`.
//
"skipTag": false,
// Skips creating a release.
// Useful when release assets will be handled with an uploader.
// Defaults to `false`.
//
"skipRelease": false,
// Signs commits with the configured credentials.
// The Signing section must be configured as well.
// Defaults to `false`.
//
"sign": false,
// The target branch to pull from.
// Defaults to the branch pointed by HEAD.
//
"branch": "main",
// The target branch to push to.
// Defaults to the branch pointed by `#{branch}`.
//
"branchPush": "{{projectName}}-{{tagName}}",
// Enables or disables asset upload.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`, `PRERELEASE`, `RELEASE_PRERELEASE`].
// Defaults to `ALWAYS`.
//
"uploadAssets": "ALWAYS",
// Release files.
// Defaults to `true`.
//
"files": true,
// Release distribution artifacts.
// Defaults to `true`.
//
"artifacts": true,
// Release checksum files.
// Defaults to `true`.
//
"checksums": true,
// Release signature files.
// Defaults to `true`.
//
"signatures": true,
// Release catalog files.
// Defaults to `true`.
//
"catalogs": true,
// Marks the release as a draft.
// Defaults to `false`.
//
"draft": false,
//
"prerelease": {
// Marks the release as prerelease.
// Defaults to `false`.
//
"enabled": false,
// A regex to determine if the project version is a prerelease
//
"pattern": ".*-pre"
},
// Links the release with a discussion.
// The named category must exist.
// Defaults to empty.
//
"discussionCategoryName": "Announcements",
// Git author used to commit to the repository.
//
"commitAuthor": {
// Name used when authoring commits.
// Defaults to `jreleaserbot`.
//
"name": "jreleaserbot",
// E-mail used when authoring commits.
// Defaults to `jreleaser@kordamp.org`.
//
"email": "jreleaser@kordamp.org"
},
//
"releaseNotes": {
// Generate release notes using GitHub's native support.
// Defaults to `false`.
//
"enabled": false,
// Configuration settings used for generating the release notes.
//
"configurationFile": ".github/custom_release_config.yml"
},
// Changelog customization.
//
"changelog": {
// Disables or enables the changelog.
// defaults to `true`.
//
"enabled": true,
// Sorts commits in ascending (oldest first) or descending (newer first).
// Supported values are: `ASC`, `DESC`.
// Defaults to `DESC`.
//
"sort": "DESC",
// Path to an external file that contains the changelog, read as is.
// May be a relative path to the configuration file or an absolute path.
// If unspecified, JReleaser will automatically calculate the changelog.
//
"external": "path/to/changelog.md",
// Create explicit markdown links for commit hashes.
// Defaults to `false`.
//
"links": false,
// Whether to skip merge commits from the generated changelog
// Defaults to `false`.
//
"skipMergeCommits": false,
// Enables or disables formatting options.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
// Defaults to `NEVER`.
//
"formatted": "ALWAYS",
// Preconfigured changelog options.
// Supported values are [`gitmoji`, `conventional-commits`].
// Requires `formatted` to be enabled.
// Defaults to empty.
//
"preset": "gitmoji",
// The template to use for each change.
// Defaults to `- {{commitShortHash}} {{commitTitle}} ({{commitAuthor}})`.
//
"format": "- {{commitShortHash}} {{commitTitle}}",
// The template to use for category titles.
// Defaults to `## {{categoryTitle}}`.
//
"categoryTitleFormat": "### {{categoryTitle}}",
// The template to use for the contributors section.
// Defaults to `## Contributors`.
//
"contributorsTitleFormat": "### Contributors",
// The template to use for the whole changelog.
// Default is shown.
//
"content": "#Changelog\n\n{{changelogChanges}}\n{{changelogContributors}}",
// Path to a template file that defines the contents.
// Review the available Name Templates.
// Defaults to `src/jreleaser/templates/changelog.tpl`.
//
"contentTemplate": "path/to/template/changelog.tpl",
//
"append": {
// Enables appending to an existing changelog file.
// Defaults to `false`.
//
"enabled": true,
// The title for the partial changelog.
// Default is shown.
//
"title": "## [{{tagName}}]",
// Path to the full changelog file where appends will occur.
// Default is shown.
//
"target": "CHANGELOG.md",
// The template to use for the partial changelog.
// Default is shown.
//
"content": "{{changelogTitle}}\n{{changelogContent}}",
// Path to a template file that defines the contents.
// Review the available Name Templates.
// Defaults to `src/jreleaser/templates/append-changelog.tpl`.
//
"contentTemplate": "path/to/template/append-changelog.tpl"
},
//
"contributors": {
// Enables the contributors block.
// Defaults to `true`.
//
"enabled": true,
// The template to use for each contributor.
// Defaults to `{{contributorName}}`.
//
"format": "- {{contributorName}} ({{contributorUsernameAsLink}})"
},
//
"hide": {
// Hide uncategorized commits.
// Defaults to `false`.
//
"uncategorized": true,
// Hide matching categories.
// Entries must exactly match category keys defined below.
// Defaults to empty.
//
"categories": [
"merge"
],
// Hide matching contributor names.
// Value may be plain text or regex.
// Defaults to empty.
//
"contributors": [
"[bot]"
]
},
// A list of labels to be included.
// Only changes matching this list will be included.
// Defaults to empty.
//
"includeLabels": [
"issue"
],
// A list of labels to be excluded.
// Changes matching this list will be excluded.
// Defaults to empty.
//
"excludeLabels": [
"issue"
],
// Defines rules that apply labels to changes.
// Matchers are evaluated independently; the label will
// be set if at least one of the matchers meets the criteria.
//
"labelers": [
{
// The label to be applied.
//
"label": "issue",
// Matches the text of the first commit line.
// Value may be plain text or regex.
// Use `regex:` as prefix to indicate a regex.
//
"title": "regex:fix:",
// Matches the full text of the commit.
// Value may be plain text or regex.
// Use `regex:` as prefix to indicate a regex.
//
"body": "Fixes #",
// Matches the name or email of a given contributor.
// Value may be plain text or regex.
// Use `regex:` as prefix to indicate a regex.
//
"contributor": "GitHub",
// Priority when sorting.
// Defaults to `null`
//
"order": 1
}
],
// Groups changes by category.
// Defaults are shown.
//
"categories": [
{
// Used for rendering
"title": "🚀 Features",
// Used for identifying the category
"key": "features",
"labels": [
"feature",
"enhancement"
],
"order": 1
},
{
"title": "🐛 Bug Fixes",
"key": "fixes",
// You may override the format per category.
"format": "- {{commitShortHash}} {{commitBody}}",
"labels": [
"bug",
"fix"
],
"order": 2
}
],
// Defines rules for replacing the generated content.
// Each replacer is applied in order.
//
"replacers": [
{
"search": "\[chore\]\s",
"replace": ""
},
{
"search": "/CVE-(\d{4})-(\d+)/g",
"replace": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-$1-$2"
}
],
// Additional properties used when evaluating templates.
//
"extraProperties": {
// Key will be capitalized and prefixed with `changelog`, i.e, `changelogFoo`.
"foo": "bar"
},
}
// A milestone associated with the release
//
"milestone": {
// Close the milestone (if it exists and still open) upon release.
// Defaults to `true`.
//
"close": true,
// The name/title of the milestone.
// May define a `JRELEASER_MILESTONE_NAME` environment variable instead.
// Defaults to `{{tagName}}`.
//
"name": "{{tagName}}"
},
// Update issues upon release.
// Adds a label and post a comment to every issue found in the changelog.
//
"issues": {
// Enables this feature.
// Defaults to `false`.
//
"enabled": true,
// Comment to post on matching issues.
//
"comment": "🎉 This issue has been resolved in `{{tagName}}` ([Release Notes]({{releaseNotesUrl}}))",
// Applies the current milestone to issues
// Valid values are: [`NEVER`, `ALWAYS`, `WARN`, `FORCE`].
//
"applyMilestone": "ALWAYS",
// Describes the label to be applied.
// Defaults are shown.
//
"label": {
#
"name": "released",
#
"color": "#FF0000",
#
"description": "Issue has been released"
}
},
// The following properties define URL formats.
// Defaults are shown.
// Review the available Name Templates.
//
"repoUrl": "https://{{repoHost}}/{{repoOwner}}/{{repoName}}",
//
"repoCloneUrl": "https://{{repoHost}}/{{repoOwner}}/{{repoName}}.git",
//
"commitUrl": "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/commits",
//
"srcUrl": "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/{gitservice_blob}/{{repoBranch}}",
//
"downloadUrl": "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/download/{{tagName}}/{{artifactFile}}",
//
"releaseNotesUrl": "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/tag/{{tagName}}",
//
"latestReleaseUrl": "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/latest",
//
"issueTrackerUrl": "https://{{repoHost}}/{{repoOwner}}/{{repoName}}/issues"
}
}
}
<jreleaser>
<!--
-->
<release>
<!--
Repo in which the release will be created.
-->
<github>
<!--
Disables or enables publication to GitHub.
defaults to `true`.
-->
<enabled>true</enabled>
<!--
Defines the connection timeout in seconds.
Defaults to `20`.
-->
<connectTimeout>20</connectTimeout>
<!--
Defines the read timeout in seconds.
Defaults to `60`.
-->
<readTimeout>60</readTimeout>
<!--
The user or organization that owns the repository.
-->
<owner>duke</owner>
<!--
The name of the repository.
If unspecified, will use `#{project.name}`.
-->
<name>app</name>
<!--
The GitHub host url.
-->
<host>github.com</host>
<!--
Username used for authoring commits. Must have write access to the repository.
Defaults to the repository's owner.
-->
<username>duke</username>
<!--
Password or OAuth token with write access to the repository.
-->
<token>__DO_NOT_SET_HERE__</token>
<!--
The GitHub API endpoint to use.
You can skip `/api/v1` as it will be added by default.
-->
<apiEndpoint>https://api.github.com</apiEndpoint>
<!--
The tag associated with the release.
If left unspecified, will use `v{{projectVersion}}`.
-->
<tagName>v1.0.0</tagName>
<!--
The tag to compare against the release tag. Is used to fetch all commits between those tags.
If left unspecified, will use the previous logical tag of `tagName`.
-->
<previousTagName>v0.9.0</previousTagName>
<!--
The name of the release.
If left unspecified, will use `Release {{tagName}}`.
-->
<releaseName>Release v1.0.0</releaseName>
<!--
Drops and creates an existing release with matching tag.
Defaults to `false`.
-->
<overwrite>true</overwrite>
<!--
-->
<update>
<!--
Appends artifacts to an existing release with matching tag,
useful if `overwrite` is set to `false`.
Defaults to `false`.
-->
<enabled>true</enabled>
<!--
Release sections to be updated.
Supported values are [`TITLE`, `BODY`, `ASSETS`].
Defaults to `ASSETS`.
-->
<sections>
<section>ASSETS</section>
</sections>
</update>
<!--
Skips creating a tag.
Useful when the tag was created externally.
Defaults to `false`.
-->
<skipTag>false</skipTag>
<!--
Skips creating a release.
Useful when release assets will be handled with an uploader.
Defaults to `false`.
-->
<skipRelease>false</skipRelease>
<!--
Signs commits with the configured credentials.
The Signing section must be configured as well.
Defaults to `false`.
-->
<sign>false</sign>
<!--
The target branch to pull from.
Defaults to the branch pointed by HEAD.
-->
<branch>main</branch>
<!--
The target branch to push to.
Defaults to the branch pointed by `#{branch}`.
-->
<branchPush>{{projectName}}-{{tagName}}</branchPush>
<!--
Enables or disables asset upload.
Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`, `PRERELEASE`, `RELEASE_PRERELEASE`].
Defaults to `ALWAYS`.
-->
<uploadAssets>ALWAYS</uploadAssets>
<!--
Release files.
Defaults to `true`.
-->
<files>true</files>
<!--
Release distribution artifacts.
Defaults to `true`.
-->
<artifacts>true</artifacts>
<!--
Release checksum files.
Defaults to `true`.
-->
<checksums>true</checksums>
<!--
Release signature files.
Defaults to `true`.
-->
<signatures>true</signatures>
<!--
Release catalog files.
Defaults to `true`.
-->
<catalogs>true</catalogs>
<!--
Marks the release as a draft.
Defaults to `false`.
-->
<draft>false</draft>
<!--
-->
<prerelease>
<!--
Marks the release as prerelease.
Defaults to `false`.
-->
<enabled>false</enabled>
<!--
A regex to determine if the project version is a prerelease
-->
<pattern>.*-pre</enabled>
</prerelease>
<!--
Links the release with a discussion.
The named category must exist.
Defaults to empty.
-->
<discussionCategoryName>Announcements</discussionCategoryName>
<!--
Git author used to commit to the repository.
-->
<commitAuthor>
<!--
Name used when authoring commits.
Defaults to `jreleaserbot`.
-->
<name>jreleaserbot</name>
<!--
E-mail used when authoring commits.
Defaults to `jreleaser@kordamp.org`.
-->
<email>jreleaser@kordamp.org</email>
</commitAuthor>
<!--
-->
<releaseNotes>
<!--
Generate release notes using GitHub's native support.
Defaults to `false`.
-->
<enabled>false</enabled>
<!--
Configuration settings used for generating the release notes.
-->
<configurationFile>.github/custom_release_config.yml</configurationFile>
</releaseNotes>
<!--
A milestone associated with the release
-->
<milestone>
<!--
Close the milestone (if it exists and still open) upon release.
Defaults to `true`.
-->
<close>true</close>
<!--
The name/title of the milestone.
May define a `JRELEASER_MILESTONE_NAME` environment variable instead.
Defaults to `{{tagName}}`.
-->
<name>{{tagName}}</name>
</milestone>
<!--
Update issues upon release.
Adds a label and post a comment to every issue found in the changelog.
--->
<issues>
<!--
Enables this feature.
Defaults to `false`.
-->
<enabled>true</enabled>
<!--
Comment to post on matching issues.
-->
<comment>🎉 This issue has been resolved in `{{tagName}}` ([Release Notes]({{releaseNotesUrl}}))</comment>
<!--
Applies the current milestone to issues
Valid values are: [`NEVER`, `ALWAYS`, `WARN`, `FORCE`].
-->
<applyMilestone>ALWAYS</applyMilestone>
<!--
Describes the label to be applied.
Defaults are shown.
-->
<label>
#
<name>released</name>
#
<color>#FF0000</color>
#
<description>Issue has been released</description>
</label>
</issues>
<!--
The following properties define URL formats.
Defaults are shown.
Review the available Name Templates.
-->
<!--
-->
<repoUrl>https://{{repoHost}}/{{repoOwner}}/{{repoName}}</repoUrl>
<!--
-->
<repoCloneUrl>https://{{repoHost}}/{{repoOwner}}/{{repoName}}.git</repoCloneUrl>
<!--
-->
<commitUrl>https://{{repoHost}}/{{repoOwner}}/{{repoName}}/commits</commitUrl>
<!--
-->
<srcUrl>https://{{repoHost}}/{{repoOwner}}/{{repoName}}/{gitservice_blob}/{{repoBranch}}</srcUrl>
<!--
-->
<downloadUrl>https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/download/{{tagName}}/{{artifactFile}}</downloadUrl>
<!--
-->
<releaseNotesUrl>https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/tag/{{tagName}}</releaseNotesUrl>
<!--
-->
<latestReleaseUrl>https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/latest</latestReleaseUrl>
<!--
-->
<issueTrackerUrl>https://{{repoHost}}/{{repoOwner}}/{{repoName}}/issues</issueTrackerUrl>
</github>
</release>
</jreleaser>
jreleaser {
//
release {
// Repo in which the release will be created.
//
github {
// Disables or enables publication to GitHub.
// defaults to `true`.
//
enabled = true
// Defines the connection timeout in seconds.
// Defaults to `20`.
//
connectTimeout = 20
// Defines the read timeout in seconds.
// Defaults to `60`.
//
readTimeout = 60
// The user or organization that owns the repository.
//
repoOwner = 'duke'
// The name of the repository.
// If unspecified, will use `#{project.name}`.
//
name = 'app'
// The GitHub host url.
//
host = 'github.com'
// Username used for authoring commits. Must have write access to the repository.
// Defaults to the repository's owner.
//
username = 'duke'
// Password or OAuth token with write access to the repository.
//
token = '__DO_NOT_SET_HERE__'
// The GitHub API endpoint to use.
// You can skip `/api/v1` as it will be added by default.
//
apiEndpoint = 'https://api.github.com'
// The tag associated with the release.
// If left unspecified, will use `v{{projectVersion}}`.
//
tagName = 'v1.0.0'
// The tag to compare against the release tag. Is used to fetch all commits between those tags.
// If left unspecified, will use the previous logical tag of `tagName`.
//
previousTagName = 'v0.9.0'
// The name of the release.
// If left unspecified, will use `Release {{tagName}}`.
//
releaseName = 'Release v1.0.0'
// Drops and creates an existing release with matching tag.
// Defaults to `false`.
//
overwrite = true
//
update {
// Appends artifacts to an existing release with matching tag,
// useful if `overwrite` is set to `false`.
// Defaults to `false`.
//
enabled = true
// Release sections to be updated.
// Supported values are [`TITLE`, `BODY`, `ASSETS`].
// Defaults to `ASSETS`.
//
section('ASSETS')
}
// Skips creating a tag.
// Useful when the tag was created externally.
// Defaults to `false`.
//
skipTag = false
// Skips creating a release.
// Useful when release assets will be handled with an uploader.
// Defaults to `false`.
//
skipRelease = false
// Signs commits with the configured credentials.
// The Signing section must be configured as well.
// Defaults to `false`.
//
sign = false
// The target branch to pull from.
// Defaults to the branch pointed by HEAD.
//
branch = 'main'
// The target branch to push to.
// Defaults to the branch pointed by `#{branch}`.
//
branchPush = '{{projectName}}-{{tagName}}'
// Enables or disables asset upload.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`, `PRERELEASE`, `RELEASE_PRERELEASE`].
// Defaults to `ALWAYS`.
//
uploadAssets = 'ALWAYS'
// Release files.
// Defaults to `true`.
//
files = true
// Release distribution artifacts.
// Defaults to `true`.
//
artifacts = true
// Release checksum files.
// Defaults to `true`.
//
checksums = true
// Release signature files.
// Defaults to `true`.
//
signatures = true
// Release catalog files.
// Defaults to `true`.
//
catalogs = true
// Marks the release as a draft.
// Defaults to `false`.
//
draft = false
//
prerelease {
// Marks the release as prerelease.
// Defaults to `false`.
//
enabled = false
// A regex to determine if the project version is a prerelease
//
pattern = '.*-pre'
}
// Links the release with a discussion.
// The named category must exist.
// Defaults to empty.
//
discussionCategoryName = 'Announcements'
// Git author used to commit to the repository.
//
commitAuthor {
// Name used when authoring commits.
// Defaults to `jreleaserbot`.
//
name = 'jreleaserbot'
// E-mail used when authoring commits.
// Defaults to `jreleaser@kordamp.org`.
//
email = 'jreleaser@kordamp.org'
}
//
releaseNotes {
// Generate release notes using GitHub's native support.
// Defaults to `false`.
//
enabled = false
// Configuration settings used for generating the release notes.
//
configurationFile = '.github/custom_release_config.yml'
}
// A milestone associated with the release
//
milestone {
// Close the milestone (if it exists and still open) upon release.
// Defaults to `true`.
//
close = true
// The name/title of the milestone.
// May define a `JRELEASER_MILESTONE_NAME` environment variable instead.
// Defaults to `{{tagName}}`.
//
name = '{{tagName}}'
}
// Update issues upon release.
// Adds a label and post a comment to every issue found in the changelog.
//
issues {
// Enables this feature.
// Defaults to `false`.
//
enabled = true
// Comment to post on matching issues.
//
comment = '🎉 This issue has been resolved in `{{tagName}}` ([Release Notes]({{releaseNotesUrl}}))'
// Applies the current milestone to issues
// Valid values are: [`NEVER`, `ALWAYS`, `WARN`, `FORCE`].
//
applyMilestone = 'ALWAYS'
// Describes the label to be applied.
// Defaults are shown.
//
label {
#
name = 'released'
#
color = '#FF0000'
#
description = 'Issue has been released'
}
}
// The following properties define URL formats.
// Defaults are shown.
// Review the available Name Templates.
//
repoUrl = 'https://{{repoHost}}/{{repoOwner}}/{{repoName}}'
//
repoCloneUrl = 'https://{{repoHost}}/{{repoOwner}}/{{repoName}}.git'
//
commitUrl = 'https://{{repoHost}}/{{repoOwner}}/{{repoName}}/commits'
//
srcUrl = 'https://{{repoHost}}/{{repoOwner}}/{{repoName}}/{gitservice_blob}/{{repoBranch}}'
//
downloadUrl = 'https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/download/{{tagName}}/{{artifactFile}}'
//
releaseNotesUrl = 'https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/tag/{{tagName}}'
//
latestReleaseUrl = 'https://{{repoHost}}/{{repoOwner}}/{{repoName}}/releases/latest'
//
issueTrackerUrl = 'https://{{repoHost}}/{{repoOwner}}/{{repoName}}/issues'
}
}
}
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 |
---|---|
username |
|
jreleaser.github.username |
JRELEASER_GITHUB_USERNAME |
token |
|
jreleaser.github.token |
JRELEASER_GITHUB_TOKEN |
tagName |
|
jreleaser.tag.name |
JRELEASER_TAG_NAME |
previousTagName |
|
jreleaser.previous.tag.name |
JRELEASER_PREVIOUS_TAG_NAME |
releaseName |
|
jreleaser.release.name |
JRELEASER_RELEASE_NAME |
milestone.name |
|
jreleaser.milestone.name |
JRELEASER_MILESTONE_NAME |
branch |
|
jreleaser.branch |
JRELEASER_BRANCH |
branchPush |
|
jreleaser.branch.push |
JRELEASER_BRANCH_PUSH |
overwrite |
|
jreleaser.overwrite |
JRELEASER_OVERWRITE |
update.enabled |
|
jreleaser.update |
JRELEASER_UPDATE |
skipTag |
|
jreleaser.skip.tag |
JRELEASER_SKIP_TAG |
skipRelease |
|
jreleaser.skip.release |
JRELEASER_SKIP_RELEASE |
draft |
|
jreleaser.draft |
JRELEASER_DRAFT |
prerelease.pattern |
|
jreleaser.prelease.pattern |
JRELEASER_PRERELEASE_PATTERN |
Git Remote
JReleaser assumes the default Git remote to be named origin
however not everyone uses that name. Should you need to use
a different name you may define an environment variable named JRELEASER_DEFAULT_GIT_REMOTE
whose value is the name
of the remote.
You must use an environment variable, can not use external properties as explained in Environment. |
Skip Release
You have the option to skip artifacts and files from a release using these fields:
-
files
. Affects files defined by Files. -
artifacts
. Affects files defined by theartifacts
section of a Distribution. -
checksums
. Affects the calculated checksums for artifacts and files. -
signatures
. Affects the generated signature files for artifacts, files, and checksums.
Additionally you may decide to skip artifacts by defining the skipRelease
extra property as true
. The associated
signature file may be skipped as well by defining skipReleaseSignatures
as an extra property on the artifact. You may
also define either of this two properties on the owning distribution
in which case the settings apply to all artifacts
found in the distribution.
Issues
Upon release, JReleaser may attach a label and post a comment on every matching issue found in the changelog. The following regular expressions will be used to find matching issues:
-
{{issueTrackerUrl}}/(\d+)
-
{{repoOwner}}/{{repoName}}#(\d+)
-
#(\d+)
-
https://github.com/duke/app/issues/123
-
duke/app#123
-
#123
The release process applies the following rules to mark issues:
-
Create the target label if it does not exist.
-
Lookup every matching issue. Skip if not closed or if it already has the label applied.
-
Apply the label and post a comment.
Additionally, the matching milestone may also be applied to issues. You may set the applyMilestone
property with any
of the following values:
-
NEVER
. Do not apply the milestone. -
ALWAYS
. Apply the milestone if the issue has no milestone. -
WARN
. Do not apply the milestone but warn if there’s an existing milestone that does not match the current one. -
FORCE
. Apply the milestone even if the issue had a different milestone.
Release Notes
GitHub offers an option
to generate release notes based on activity posted to a given repository. You may use this feature to generate the changelog.
However, be aware that only one of releaseNotes
or changelog
may be enabled at all times.
Assets Size
GitHub imposes a size limit for release assets (currently around 100MB). hub4j, the underlying library used to interact with GitHub processes assets by reading all files in memory, one by one. This may lead to `OutOfMemoryError`s and failed releases.
If your release has big assets then it’s recommended to increase the memory of the jreleaser
process. When running on
the CLI you may pass a flag such as JAVA_OPTS="-Xmx5g"
; when using Maven, Gradle, or Ant use their corresponding options to set
the memory flags.