UNPKG

commit-releaser-minco

Version:
109 lines (70 loc) 2.85 kB
# 🚀 Commit Releaser [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](LICENSE) [![Node.js Version](https://img.shields.io/badge/node-%3E%3D14.0.0-brightgreen)](https://nodejs.org/) [![Made with ❤️ by Devs](https://img.shields.io/badge/Made%20with-%E2%9D%A4%EF%B8%8F%20by%20Developers-blueviolet)](https://github.com/) > ✨ **Commit Releaser** — Automatic Git commit, versioning, and push to GitHub with a single CLI command. ## 📦 Description **Commit Releaser** is a simple but powerful CLI tool that helps you automate your Git commit and release workflow. With just one command, it can: - Stage and commit your changes - Optionally bump the version (`patch`, `minor`, or `major`) - Automatically push to your desired Git branch --- ## ⚠️ Prerequisites Before using this tool, make sure: * You are inside a Git repository * You have at least one remote (e.g., `origin`) * You are on a branch (e.g., `main` or `dev`) ### 📘 Example: Setting Up Git ```bash # Initialize Git repository (if not done yet) git init # Add your files git add . # Commit initial work git commit -m "Initial commit" # Create a branch (if not yet) git branch -M main # Add a remote (example with GitHub) git remote add origin https://github.com/yourusername/your-repo.git # Push for the first time git push -u origin main ``` Once that's set up, you're ready to use `commit-releaser-minco`. --- ## ⚙️ Installation ```bash npm install --save-dev commit-releaser-minco ```` ## 🚀 Usage Run via `npx` script or directly via CLI: ```bash npx commit-releaser-minco "Your commit message" ``` This will: * Stage changes * Commit them ### Push changes to remote: ```bash npx commit-releaser-minco "Your commit message" push ``` ### Push and bump version (patch/minor/major): ```bash npx commit-releaser-minco "Your commit message" push patch npx commit-releaser-minco "Your commit message" push minor npx commit-releaser-minco "Your commit message" push major ``` ## 📘 Examples | Command | Action | | ---------------------------------------------- | ------------------------------------ | | `npx commit-release-minco "fix: corrected typo"` | Commit only | | `npx commit-release-minco "feat: new feature" push` | Commit and push | | `npx commit-release-minco "release: v1.0.1" push patch` | Commit, bump patch version, and push | ## 🛠️ Configuration By default, the script: * Uses `main` as the branch * Uses `origin` as the remote You can modify these defaults in the script if needed. ## 📝 License ISC License © 2025 --- Made with ❤️ by Devs (Haydar)