Skip to content

kh4f/relion

Repository files navigation

logo

npm version  bundle size  license  open bugs


A minimal npm library for automating release workflow:
version bumping, release commit & tag creation, and AI‑assisted changelog generation.

Installation  •  CLI  •  API  •  Workflow Steps  •  Changelog Generation


📥 Installation

pnpm add -D relion

🚀 CLI Usage

Running the CLI without arguments prints help

$ pnpm relion

Usage: relion [options]

Options:
  -b            Bump the version
  -f            Prepare release context
  -c            Create a release commit
  -t            Create a release tag
  -v <version>  Set the new version explicitly
  -d            Run in dry run mode

Examples:
- `pnpm relion -bct` — bump version, create release commit and tag
- `pnpm relion -f` — generate release context file

🧩 API Usage

import relion from 'relion';

relion({
	flow: ['bump', 'context', 'commit', 'tag'],
	newVersion: '1.2.3',
	bumpFiles: ['package.json'],
	contextFile: 'RELEASE.md',
	commitMessage: 'chore(release): {{tag}}',
	tagPrefix: 'v',
	dryRun: false,
});

Options

  • flow: release workflow steps ('bump' | 'context' | 'commit' | 'tag') (default: [])
  • newVersion: set the new version explicitly
  • bumpFiles: files or bumpers for version update (default: ['package.json'])
  • contextFile: path to release context output file (default: 'RELEASE.md')
  • commitMessage: release commit message template (default: 'chore(release): {{tag}}')
  • tagPrefix: release tag prefix (default: 'v')
  • commitFilters: filters for selecting commits in release context (default: commits with types feat, fix, perf, style, docs or with BREAKING CHANGE)
  • dryRun: run in dry mode (no modifications)

Configuration via package.json

Relion can also be configured via relion field in package.json:

{
  // ...
  "relion": {
    "commitMessage": "release(relion): {{tag}}",
    "tagPrefix": ""
    // ...
  }
}

Note

CLI flags override package.json configuration.

♻️ Workflow Steps

  • Bump: updates version in specified files
  • Context: generates a file with upcoming release metadata and commit log
  • Commit: creates a release commit (release context file is not committed)
  • Tag: creates an annotated release tag
Generated release context example (*):
---
version: 0.33.0
tag: v0.33.0
date: Jan 10, 2026
prevTag: v0.32.1
repoURL: https://github.com/kh4f/relion
---

## Commit Log

[8f29acf] fix(versioner): ensure breaking changes take priority over features in release type calculation

Previously, if commits contained both features and breaking changes, features would be checked last and could incorrectly override the 'major' release type with 'minor'.
------------------------------
[e105d51] feat(config-merger): add `mergeConfigs` implementation and export

- Implement `mergeConfigs` to support merging config profiles in `config-merger.ts`
- Export `mergeConfigs` from `src/index.ts`
------------------------------

📚 Changelog Generation

Relion does not format changelog itself — it generates a release context that can be used to generate a user‑friendly changelog using AI.

Recommended workflow:

  1. Set up GitHub Copilot instructions and prompt:
  2. Run the context step to generate RELEASE.md: pnpm relion -f
  3. Run the prompt in VSCode Copilot chat: /generate-changelog
  4. Copilot produces a polished changelog entry based on the release context
Generated changelog example (from the (*) release context using the instructions and prompt above; Gemini 3 Pro)
## &ensp; [` 📦 v0.33.0  `](https://github.com/kh4f/relion/compare/v0.32.1...v0.33.0)

### &emsp; 🎁 Features
- **Config merging utility**: added `mergeConfigs` implementation to support merging config profiles. [🡥](https://github.com/kh4f/relion/commit/e105d51)

### &emsp; 🩹 Fixes
- **Correct release type calculation**: breaking changes now correctly take priority over features when determining the release type, preventing incorrect minor bumps. [🡥](https://github.com/kh4f/relion/commit/8f29acf)

##### &emsp;&emsp; [_Full Changelog_](https://github.com/kh4f/relion/compare/v0.32.1...v0.33.0) &ensp;&ensp; _Jan 10, 2026_

MIT License © 2025-2026 kh4f