@nona-creative/semantic-release-latest-release-notes v1.0.1
Semantic Release Latest Release Notes
Writes the latest release notes for Semantic Release to the files of your choice, in either Markdown or Plain Text format.
Table of Contents
- Purpose Of This Plugin
- Usage
- Configuration
- Available Commands
- Additional Docs
- Quick Start For Development
- Testing
Purpose Of This Plugin
When deploying mobile applications to the Play Store or Testflight, it's often useful to the latest release notes supplied by Semantic Release as plain text, so that they can be supplied as part of the what to test next notes.
This plugin allows you to write these notes out to a file or files, in either Plain Text (strips the markdown from generated release notes) or Markdown format.
Usage
The plugin can be configured in the semantic-release configuration file
An example usage in .releaserc could be e.g:
{
"branches": [
"your-branch"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator"
[
"semantic-release-latest-release-notes",
{
"latestReleaseNotesTitle": "# What's New",
"latestReleaseNotesFile": "docs/latest-release-notes",
"latestReleaseNotesFormats" : ["text", "markdown"]
}
],
"@semantic-release/github",
"@semantic-release/npm",
]
}
With this example, for each release, a docs/latest-release-notes.md and docs/latest-release-notes.txt file will be created or overwritten.
Configuration
Options
The following options may be passed to the plugin:
- latestReleaseNotesTitle: a string specifying the title to use for the latest release notes. E.g.
# What's New
. Default islatest-release-notes
- latestReleaseNotesFile: a string specifying the file path and name to write the outputs to (without an extension). E.g. latest-release-notes. Default is
# Latest Release Notes
- latestReleaseNotesFormats: a an array of formats to write the output in. Current formats include
text
andmarkdown
. Default is['text', 'markdown']
Available Commands
To see a list of available commands in this package when cloning the repo run:
npm run help
Additional Docs
Quick Start For Development
- go through all the Prerequisites in Prerequisites
npm i
install NPM dependenciesnpm run build
build the package
Testing
We use Jest for testing. To run unit tests, you can use one of the following commands, to run once, run in watch mode, or to run all tests and generate converage reports.
npm run test
npm run test:watch