@bassist/release
Simple GitHub release generator by @chengpeiquan , based on GitHub CLI.
If you're tired of having to release every time on GitHub web, you can use this package to make it easier and just run a single command.
Prerequisite
For the security of your account and to avoid Token leakage, you must first install GitHub CLI and complete the login on it.
See: GitHub CLI
And make sure you have Release permissions on the project's GitHub repository.
There is another requirement, please configure the repository information of package.json
according to the specifications of npm docs.
See: repository
e.g.
For single-package repo:
{
"repository": {
"type": "git",
"url": "https://github.com/chengpeiquan/bassist"
}
}
For monorepo, you can specify the directory
in which it lives:
{
"repository": {
"type": "git",
"url": "https://github.com/chengpeiquan/bassist",
"directory": "packages/utils"
}
}
Currently supported URL formats are:
https://github.com/chengpeiquan/bassist
https://github.com/chengpeiquan/bassist.git
github:chengpeiquan/bassist
Usage
This is a CLI tool, you can install it locally and run it through commands such as pnpm exec.
Install it:
pnpm add -D @bassist/release
In your package.json
:
{
"scripts": {
"gen:release": "pnpm exec release"
}
}
Run on command line:
pnpm gen:release
You can view the latest release information on the releases page of your GitHub repository.
Options
For most projects, the default settings are sufficient. If adjustments are sometimes needed, some options are provided to pass on.
On the command line, options can be passed to the program, e.g. --preset angular
by option, or -p angular
by short flag.
Option | Short Flag | Default Value | Description |
---|---|---|---|
branch | b | main |
The branch where the CHANGELOG file is located |
changelog | c | CHANGELOG.md |
The file name of the change log |
Btw: The paths are all based on process.cwd()
, which is usually run from the root directory of the package (the directory where package.json
is located).
If there are any running problems, please provide a reproducible example in the issue .
Release Notes
Please refer to CHANGELOG for details.
License
MIT License © 2023-PRESENT chengpeiquan