Skip to content

Commit

Permalink
chore: reconfigure lerna for releases
Browse files Browse the repository at this point in the history
This is an experimental change.

It modifies the Lerna configuration to publish independent packages (without `nx`) using conventional commits.  This will create/update CHANGELOGs and create GitHub Releases for each workspace upon publish.

This is what [Appium](https://github.com/appium/appium) does, and I believe the goals for our release process are nearly identical.  Please look at the releases/tags in that repo for what you get.

To publish, just run `yarn release`.  Note that we may want to add a `preversion` lifecycle script which runs a clean/build.

# Conflicts:
#	package.json
#	yarn.lock
  • Loading branch information
boneskull committed Jul 24, 2023
1 parent 64b826d commit 1977863
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 14 additions & 0 deletions lerna.json
@@ -1,5 +1,19 @@
{
"$schema": "https://json.schemastore.org/lerna",
"changelogPreset": "conventional-changelog-conventionalcommits",
"command": {
"publish": {
"message": "chore: publish"
},
"version": {
"allowBranch": "main",
"conventionalCommits": true,
"createRelease": "github"
}
},
"ignoreChanges": ["**/test/**", "**/*.md"],
"npmClient": "yarn",
"useNx": false,
"useWorkspaces": true,
"version": "independent"
}
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -8,11 +8,12 @@
"devDependencies": {
"@metamask/eslint-config-nodejs": "^11.0.1",
"ava": "^5.2.0",
"conventional-changelog-conventionalcommits": "^6.1.0",
"depcheck": "^1.4.0",
"eslint": "^8.40.0",
"eslint-plugin-ava": "^13.2.0",
"eslint-plugin-node": "^11.1.0",
"lerna": "^6.6.2"
"lerna": "^7.1.4"
},
"engines": {
"node": ">=14.0.0"
Expand All @@ -25,7 +26,7 @@
"preversion": "npm run rebuild",
"build": "npm -w @lavamoat/lavapack -w @lavamoat/viz -w @lavamoat/yarn-plugin-allow-scripts run build",
"rebuild": "npm -w @lavamoat/lavapack -w @lavamoat/viz -w @lavamoat/yarn-plugin-allow-scripts run rebuild",
"publish": "lerna publish from-package --no-push --no-git-tag-version --yes",
"release": "lerna publish",
"setup": "allow-scripts"
},
"workspaces": [
Expand Down

0 comments on commit 1977863

Please sign in to comment.