npm.io
0.2.1 • Published 6h agoCLI

@amiramirov/release

Licence
MIT
Version
0.2.1
Deps
5
Size
38 kB
Vulns
0
Weekly
0

@amiramirov/release

Automate cherry-pick release workflow for Git repositories with GitLab.

Install

As a global CLI (recommended — puts release on your $PATH):

npm install -g @amiramirov/release

Or run one-off with npx — no install, latest version:

npx @amiramirov/release

Or add as a dev-dependency to a project (invoke via npx release or package.json scripts):

npm install --save-dev @amiramirov/release

Usage

From inside a Git repository with a GitLab origin:

release

The interactive flow will:

  1. Ask for a GitLab Personal Access Token on first run (stored in ~/.config/release-cli/config.yml, permissions 600).
  2. Fetch tags/branches from the remote.
  3. Let you pick a base production tag.
  4. List commits between the base tag and origin/main, hiding those already released (patch-id match).
  5. Multi-select commits to include.
  6. Ask whether to create a GitLab Release.
  7. If yes: pick a semver bump (patch/minor/major), set release date/time (default tomorrow 09:00 local), edit description in $EDITOR (prefilled with commit subjects).
  8. Show a summary and confirm.
  9. Cherry-pick in a temporary worktree (your checked-out branch and uncommitted changes are never touched), push the release branch, POST to GitLab Releases API (GitLab creates the tag server-side).

Options

  • --remote <name> — Git remote to use (default: origin)
  • --no-fetch — skip git fetch at start
  • --tag-pattern <glob> — override glob for production tags (default from config, v*)
  • --show-released — include commits already present in the base tag (hidden by default)

Config

~/.config/release-cli/config.yml:

gitlabUrl: https://gitlab.com
gitlabToken: glpat-...
mainBranch: main
productionTagPattern: v*
releaseBranchPattern: release/{tag}
allowMergeCommits: false

Requirements

  • Node.js 20 LTS or newer
  • git in PATH
  • Interactive TTY (arrow-key prompts)

License

MIT

Keywords