@justia/releaser
A script to generate releases and changelog
General
This project bundles Release It!, @release-it/conventional-changelog, and custom plugins. It exposes a pre-configured JavaScript object that can be overriden as needed depending on the needs of the project.
How?
Install
Into project: npm install -D @justia/releaser
Globally: npm install -g @justia/releaser
Use
If you have this project installed globally you can use the following commands:
Run a release:
jReleaser
Run a with calendar versioning:
jReleaser --calver=YYYY.MM.MICRO
The format is optional.
Run a with a custom config:
You can extend the configuration using the config parameter.
jReleaser --config='{"github":{"release":false}}'
NPM Scripts
To avoid having to install the global package, you can also add npm scripts to your package.json
's npm scripts: {}
object.
For example:
"release": "jReleaser"
Use Config Only
If you want to skip using the tool, and instead use release-it
as intended, you can do that too.
Add a file called release-it.js
to your project root, with the following contents:
'use strict';
const config = require('@justia/releaser');
module.exports = {
plugins: config.plugins,
git: config.git,
gitHub: config.gitHub,
npm: config.npm,
};
You can configure the above as necessary to suit your project.
You can now run jReleaser
commands, passing our config:
jReleaser --config='release-it.js'
Publish new version
The first step to publish a new version it's running the commands specified on CONTRIBUTING.md in the Release section. Once the version it's published on NPM by lerna, the new release should be updated on the ga-releaser repository with the next simple steps:
- Update the version in the
package.json
file. - Update the
package-lock.json
file. - Merge changes to the release branch.
- Wait until the GitHub action updates the node_modules inside that branch and the release it's ready.
Once those steps are done, the GitHub action will be reflected and applied for all the projects.