diff --git a/package.json b/package.json index e35757b29f229f..1a35f14a1faa4b 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,8 @@ "package-plugin": "./bin/build-plugin-zip.sh", "pot-to-php": "./bin/pot-to-php.js", "publish:check": "npm run build:packages && lerna updated", - "publish:dev": "npm run build:packages && lerna publish --npm-tag next", + "publish:dev": "npm run build:packages && lerna publish --dist-tag next", + "publish:legacy": "npm run build:packages && lerna publish --dist-tag legacy", "publish:prod": "npm run build:packages && lerna publish", "test": "npm run lint && npm run test-unit", "test-e2e": "wp-scripts test-e2e --config packages/e2e-tests/jest.config.js", diff --git a/packages/README.md b/packages/README.md index 3937b7adee5a3f..b0f7d8562cdb32 100644 --- a/packages/README.md +++ b/packages/README.md @@ -180,5 +180,15 @@ npm run publish:prod Choose the correct version based on `CHANGELOG.md` files, confirm your choices and let Lerna do its magic. +### Legacy Patch Release + +To release a patch for the older major or minor version of packages, run the following command: + +```bash +npm run publish:legacy +``` + +This is usually necessary when adding bug fixes or security patches to the earlier versions of WordPress. + [lerna]: https://lerna.js.org/ [npm]: https://www.npmjs.com/