feat: implement simpler, more reliable release workflow

- Add scripts/release.sh for automated build → test → commit → push → publish → release
- Fix .versionrc.json types configuration (was causing 'types.find is not a function' error)
- Remove problematic precommit/postcommit hooks that ran full test suite during release
- Keep standard-version as fallback option (npm run release:standard-version:*)
- New workflow is faster, more reliable, and easier to debug

Usage:
  npm run release         # patch release (3.20.4 → 3.20.5)
  npm run release:minor   # minor release (3.20.4 → 3.21.0)
  npm run release:major   # major release (3.20.4 → 4.0.0)
  npm run release:dry     # dry-run mode (no changes)
This commit is contained in:
David Snelling 2025-10-01 13:26:04 -07:00
parent 0039a26623
commit 386fd2cd11
3 changed files with 170 additions and 54 deletions

View file

@ -1,48 +1,16 @@
{
"types": {
"feat": {
"description": "✨ New Features",
"title": "✨ Features"
},
"fix": {
"description": "🐛 Bug Fixes",
"title": "🐛 Bug Fixes"
},
"docs": {
"description": "📚 Documentation",
"title": "📚 Documentation"
},
"style": {
"description": "💄 Code Style",
"title": "💄 Styles",
"hidden": true
},
"refactor": {
"description": "♻️ Code Refactoring",
"title": "♻️ Code Refactoring"
},
"perf": {
"description": "⚡ Performance Improvements",
"title": "⚡ Performance Improvements"
},
"test": {
"description": "✅ Tests",
"title": "✅ Tests"
},
"build": {
"description": "🔧 Build System",
"title": "🔧 Build System"
},
"ci": {
"description": "🔄 CI/CD",
"title": "🔄 CI/CD"
},
"chore": {
"description": "🔧 Chores",
"title": "🔧 Chores",
"hidden": true
}
},
"types": [
{"type": "feat", "section": "✨ Features"},
{"type": "fix", "section": "🐛 Bug Fixes"},
{"type": "docs", "section": "📚 Documentation"},
{"type": "refactor", "section": "♻️ Code Refactoring"},
{"type": "perf", "section": "⚡ Performance Improvements"},
{"type": "test", "section": "✅ Tests"},
{"type": "build", "section": "🔧 Build System"},
{"type": "ci", "section": "🔄 CI/CD"},
{"type": "style", "hidden": true},
{"type": "chore", "hidden": true}
],
"compareUrlFormat": "https://github.com/soulcraftlabs/brainy/compare/{{previousTag}}...{{currentTag}}",
"commitUrlFormat": "https://github.com/soulcraftlabs/brainy/commit/{{hash}}",
"issueUrlFormat": "https://github.com/soulcraftlabs/brainy/issues/{{id}}",
@ -51,10 +19,6 @@
"issuePrefixes": ["#"],
"header": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n",
"scripts": {
"postbump": "echo 'Version bumped to' $(node -p \"require('./package.json').version\")",
"precommit": "npm run build && npm test",
"postcommit": "echo 'Release commit created. Ready to push and publish!'",
"pretag": "echo 'Creating tag...'",
"posttag": "echo 'Tag created. Use: git push --follow-tags origin main && npm publish'"
"postbump": "echo '✅ Version bumped to' $(node -p \"require('./package.json').version\")"
}
}