Skip to content

wp/6.5: Add ignore_changes and dry_run inputs to the npm publishing workflow - #892

Open
desrosj wants to merge 1 commit into
fix-actions-wp-6.5-npm-publish-no-npxfrom
fix-actions-wp-6.5-npm-publish-dry-run
Open

desrosj wants to merge 1 commit into
fix-actions-wp-6.5-npm-publish-no-npxfrom
fix-actions-wp-6.5-npm-publish-dry-run

Conversation

@desrosj

@desrosj desrosj commented Nov 2, 2026

Copy link
Copy Markdown
Owner

What?

Adds two inputs to publish-npm-packages.yml on wp/6.5:

  • ignore_changes: extra space-separated globs that Lerna ignores when it detects changed packages.
  • dry_run: runs lerna changed with the same options and lists the packages that would be published, without bumping, tagging, pushing or publishing anything.

Commit: b76732b

Why?

Lerna compares every package against the most recent release tag on the branch. When packages are published without Lerna, as in the October security release, no tag records them, so Lerna counts them as changed again and bumps them and every package that depends on them. ignore_changes lets a release leave those packages out, and dry_run shows the list before anything is published.

For the first release from this branch, the packages that were already published without tags on this branch can be left out with:

packages/block-library/** packages/block-serialization-default-parser/** packages/block-serialization-spec-parser/** packages/interactivity/** packages/interactivity-router/**

With those globs, Lerna lists env, e2e-tests, e2e-test-utils and scripts. Once that release pushes its own tags, later releases do not need ignore_changes.

How?

  • Passing --ignore-changes replaces the ignoreChanges list in lerna.json, so the step repeats that list before adding the input's globs. The list is the same on every wp/X.Y branch.
  • lerna changed exits with 1 when no package changed. The dry run treats that one result as success and fails on any other error.
  • The inputs reach the shell through env rather than being interpolated into run.

Testing Instructions

  • Locally on wp/6.9 and wp/6.4 (same step, Lerna 8.1.9 and 7.1.4): the dry run lists 23 packages with no ignore_changes, and 2 and 4 packages with the globs above.
  • At a commit that is already released, the dry run prints No changed packages found and succeeds.
  • An invalid value (--not-a-real-flag) makes Lerna exit with Unknown arguments, and the step fails.
  • actionlint passes.

🤖 Generated with Claude Code

@desrosj
desrosj added this pull request to stack #886 November 2, 2026 20:05
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🤖 PR meta 🤖

🏷️ Labels

This pull request needs exactly one label indicating its type, and has 0.

  • Required: any label starting with [Type].
  • Found: none.

Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant