Skip to content

📘 semantic-release plugin to create or update a changelog file

License

Notifications You must be signed in to change notification settings

MorpheApp/changelog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

311 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@MorpheApp/changelog

semantic-release plugin to create or update a changelog file.

Warning

Please consider whether committing release notes to a file is worth the added complexity compared to other available options for capturing release notes.

Step Description
verifyConditions Verify the changelogFile and changelogTitle options configuration.
prepare Create or update a changelog file in the local project directory with the changelog content created in the generate notes step.

Install

$ npm install --save-dev git+https://github.com/MorpheApp/changelog.git#bundle

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@MorpheApp/changelog",
      {
        "changelogFile": "docs/CHANGELOG.md",
        "releaseJson": {
          "enabled": true,
          "path": "docs/release.json",
          "downloadUrlTemplate": "https://github.com/${owner}/${repo}/releases/download/v${version}/app-release-${version}.apk",
          "signatureUrlTemplate": "https://github.com/${owner}/${repo}/releases/download/v${version}/app-release-${version}.apk.asc"
        }
      }
    ],
    [
      "@semantic-release/git",
      {
        "assets": [
          "docs/CHANGELOG.md",
          "docs/release.json"
        ]
      }
    ]
  ]
}

With this configuration:

  • docs/CHANGELOG.md will be created or updated on each release.

  • docs/release.json will be generated alongside the changelog.

  • Download URLs inside docs/release.json will be generated from templates.

  • Both files will be committed as part of the release.

Configuration

Options

Changelog options

Options Description Default
changelogFile File path of the changelog. CHANGELOG.md
changelogTitle Title of the changelog file (first line of the file). -

releaseJson options

Option Description Default
releaseJson.enabled Enable or disable release.json generation. true
releaseJson.path Output path for release.json. release.json
releaseJson.downloadUrlTemplate Template for the primary download URL. Supports ${version}, ${owner}, ${repo}. GitHub releases URL
releaseJson.signatureUrlTemplate Template for the signature download URL. Supports ${version}, ${owner}, ${repo}. GitHub releases URL

Template variables

The following variables are available in URL templates:

Variable Description
${version} The released version (nextRelease.version)
${owner} GitHub repository owner
${repo} GitHub repository name

Examples

When used with the @semantic-release/git or @semantic-release/npm plugins the @MorpheApp/changelog plugin must be called before those plugins in order to update the changelog file so the @semantic-release/git and @semantic-release/npm plugins can include it in the release.

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@MorpheApp/changelog",
    "@semantic-release/npm",
    "@semantic-release/git"
  ]
}

About

📘 semantic-release plugin to create or update a changelog file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%