@arizmuajianisan/gitworkflow
v1.0.5
Published
Zero-config semantic-release, commitlint & Husky bootstrapper
Maintainers
Readme
gitworkflow
Created by arizmuajianisan
A one-command setup for a professional Git workflow
(semantic-release + commitlint + Husky + CHANGELOG) – zero config.This project is an update from my previous project git-workflow-init
📚 Table of contents
✨ What you get
| Feature | Included |
| --------------------------- | --------------------------------------- |
| Conventional commit linting | @commitlint/cli |
| Automatic versioning | release-it + conventional-changelog |
| CHANGELOG.md generation | Auto-created |
| Git hooks | Husky |
| GitHub releases | Tagged release notes |
| Zero-config | Works out of the box |
📦 Installation
Quick (no install)
npx @arizmuajianisan/gitworkflowGlobal install
npm i -g @arizmuajianisan/gitworkflow
npx @arizmuajianisan/gitworkflow --yes🚀 Usage
Inside any repo:
cd my-project npx @arizmuajianisan/gitworkflowFollow the prompts (or
--yesto skip).Start committing:
git add . git commit -m "feat: add dark-mode toggle"Release:
npm run releaseThis will:
- calculate the next semver (patch / minor / major) from commit messages
- create a CHANGELOG.md
- push a tagged release to GitHub
Run
--dry-runto see what will happen without actually releasing.
🎯 Commit message format
We follow Conventional Commits.
| Type | Release level |
| ------------------------------------- | ------------- |
| feat | minor |
| fix / perf / refactor | patch |
| feat!: or footer BREAKING CHANGE: | major |
Examples:
This will create a patch release, for example v1.0.0 -> v1.0.1:
fix: handle null valuesThis will create a minor release, for example v1.0.0 -> v1.1.0:
feat: add dark-mode toggleThis will create a major release, for example v1.0.0 -> v2.0.0:
feat!: drop Node 16 support🔧 Configuration
Everything is pre-configured; advanced tweaks can be made in:
| File | Purpose |
| ---------------------- | ------------------- |
| .release-it.json | release-it settings |
| commitlint.config.js | commit lint rules |
| .husky/ | Git hooks |
🤖 CI / CD
No extra setup required; just set the secret:
# GitHub Actions example
- name: Release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}📋 Requirements
- Node.js ≥ 18
- Git repo (initialized or empty)
- GitHub personal access token (classic or fine-grained) with repo scope
🔍 Troubleshooting
Hook not running?
npm run prepare # re-install Husky hooksNeed to change token?
Edit .env:
GITHUB_TOKEN=ghp_xxxx🤝 Contributing
- Fork the repo
- Clone the fork
git clone https://github.com/arizmuajianisan/gitworkflow.git cd gitworkflow - Install dependencies
npm install - Create your feature branch
git checkout -b <your-feature-branch> - Commit your changes
git add . git commit -m "feat: add dark-mode toggle" - Push to your fork
git push origin <your-feature-branch> - Open a Pull Request
📝 TODO
[ ] Compatibility with Husky v10
husky - DEPRECATED. Please remove the following two lines from .husky/pre-push:
#!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh"They WILL FAIL in v10.0.0
[ ] Add CLI selection for package manager (yarn, pnpm)
[ ] Add CLI configuration for rules on commitlint
[ ] Add capability to run
batstests on non-main branch
