-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflow: Run Lerna directly from GitHub action when publishing to npm targeting WP core #53762
Conversation
wp/X.Y
branch when publishing to npm for WordPress core
Size Change: 0 B Total Size: 1.51 MB ℹ️ View Unchanged
|
224b941
to
e2e3bf2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes make sense to me. Given there is no way to fully test this until the next package release, I'm all in for trying ✅
I discussed it with @tellthemachines, and she plans to test this revised workflow on Monday. I will help with any alternatives in case anything goes wrong. |
Unfortunately, the changes aren't enough, and the workflow for the |
What?
Fixes #53628.
Why?
This is exactly what has happened when trying to publish npm packages targeting WordPress 6.3.1 as documented in #53623. For reference the job that failed:
https://github.com/WordPress/gutenberg/actions/runs/5874702589/job/15929869480#step:8:409
Th script got executed with Node.js 16 and npm 8, but the
wp/6.3
branch runs on Node.js 14 and npm 6. In addition to that, the branch has strict setting allowing only npm 6.How?
I ended up simplifying the way we publish when targeting WordPress core releases. We run Lerna directly, as it turns out we never update changelog files, nor cherry-pick commits to
trunk
as in other scenarios.I also removed all npm scripts that we stopped using:
npm run publish:check
npm run publish
npm run publish:patch
I updated documentation to use Lerna commands directly.
Testing Instructions
I don't know what would be the best way to test it without merging. It should just work the next time we have to publish npm packages for WordPress 6.4.x minor release following the instructions:
https://github.com/WordPress/gutenberg/blob/trunk/docs/contributors/code/release.md#wordpress-releases