Skip to content

Commit

Permalink
ci: Switch to lerna-lite, setup changelog preset
Browse files Browse the repository at this point in the history
- use lerna-lite
  - the limited scope is sufficient for our purposes
  - it has various nice extra features
  - enable sync workspace
  - include author login in changelog
- use conventionalcommits changelog preset
  - proper handling of breaking changes and "!" suffix
  - potential more control over commit types in changelog
- build the lib on `prepack` to ensure we publish the latest state
- adjust lerna options in prerelease script
  • Loading branch information
yuqiora committed Oct 27, 2022
1 parent 65c6a35 commit 6c0feed
Show file tree
Hide file tree
Showing 5 changed files with 1,153 additions and 1,637 deletions.
2 changes: 1 addition & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Releasing

Whole release process is entirely automated and handled by `lerna`.
Whole release process is entirely automated and handled by [`lerna-lite`](https://github.com/ghiscoding/lerna-lite).
See [complete instructions](#publishing-a-regular-release) below.

## Release notes
Expand Down
8 changes: 7 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
"version": "2.2.1",
"npmClient": "yarn",
"useWorkspaces": true,
"ignoreChanges": ["**/*.spec.*"],
"command": {
"version": {
"message": "chore(release): %s",
"createRelease": "github",
"conventionalCommits": true,
"push": true
"changelogIncludeCommitsClientLogin": " by @%l",
"changelogPreset": {
"name": "conventionalcommits"
},
"push": true,
"syncWorkspaceLock": true
}
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "spicy-hooks",
"version": "2.1.3",
"private": true,
"repository": {
"type": "git",
Expand All @@ -16,10 +15,12 @@
"rxjs": "^7.5.5"
},
"devDependencies": {
"@lerna-lite/cli": "^1.12.0",
"@testing-library/react-hooks": "^3.4.2",
"@types/jest": "^26.0.10",
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"conventional-changelog-conventionalcommits": "^5.0.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.1",
"eslint": "^7.10.0",
Expand All @@ -33,14 +34,14 @@
"eslint-plugin-react-hooks": "^4.1.2",
"eslint-plugin-standard": "^4.0.1",
"jest": "^26.4.2",
"lerna": "^5.0.0",
"react-test-renderer": "^17.0.2",
"ts-jest": "^26.4.1",
"typedoc": "next",
"typescript": "^4.7.3"
},
"scripts": {
"preinstall": "git config core.hooksPath git-hooks",
"prepack": "yarn build",
"build": "tsc -b packages/*/tsconfig.build.json",
"watch": "tsc -b packages/*/tsconfig.build.json -w",
"clean-build": "rm -rf packages/*/{tsconfig.tsbuildinfo,lib}",
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-prerelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ if [ -z "$1" ]; then
echo " publish-prerelease.sh beta"
fi

lerna publish prerelease --preid "$1" --dist-tag "$1"
yarn lerna publish prerelease --preid "$1" --dist-tag "$1" --message "chore(prerelease): %s" --exact --no-changelog
Loading

0 comments on commit 6c0feed

Please sign in to comment.