https://github.com/0x-jerry/x-release
A tool that helps you to create a new release quickly.
https://github.com/0x-jerry/x-release
nodejs release-tool
Last synced: about 1 month ago
JSON representation
A tool that helps you to create a new release quickly.
- Host: GitHub
- URL: https://github.com/0x-jerry/x-release
- Owner: 0x-jerry
- License: mit
- Created: 2021-12-29T08:44:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-09-11T07:57:22.000Z (9 months ago)
- Last Synced: 2025-10-13T22:38:50.349Z (8 months ago)
- Topics: nodejs, release-tool
- Language: TypeScript
- Homepage:
- Size: 276 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# X-Release
A tool that helps you to create a new release quickly.
## Install
```sh
pnpm i @0x-jerry/x-release -D
# or
pnpm i @0x-jerry/x-release -g
```
## Usage
```
Usage:
$ x-release [new-version]
Commands:
[new-version] the tasks to run.
Example:
- x-release --patch
- x-release 0.0.1
- x-release 0.1.1 --publish false
For more info, run any command with the `--help` flag:
$ x-release --help
Options:
--patch auto-increment patch version number
--minor auto-increment minor version number
--major auto-increment major version number
--prepatch auto-increment prepatch version number
--preminor auto-increment preminor version number
--premajor auto-increment premajor version number
--prerelease auto-increment prerelease version number
--publish run npm publish, default is true
--tag new tag format, default is: "v${version}"
--commit the commit message template, default is: "chore: release v${version}"
-h, --help Display this message
-v, --version Display version number
```
## Configuration
Config file: `release.conf.ts`
Example config file:
```ts
import { defineConfig } from '@0x-jerry/x-release'
export default defineConfig({
/**
* run npm publish, default true
*/
publish: true,
/**
* tag template
*/
tag: '${prefix}v${version}',
/**
* commit template
*/
commit: 'chore: release ${prefix}v${version}',
/**
* run tasks after bump version
*/
tasks: [
'npm test', // run npm test
async (ctx) => {
console.log('new version is:', ctx.nextVersion)
await ctx.run(`echo "custom script, all tasks are finished!"`)
},
],
})
```
Package.json `release`
```json
{
"release": {
"publish": true,
"tag": "${prefix}v${version}",
"commit": "chore: release ${prefix}v${version}",
"tasks": [
"npm run test",
"echo 'run custom script after bump version'",
"echo 'this should be the last script'"
]
}
}
```