Skip to content

ci: convert publish-if-needed script back to plain node#4017

Merged
Saadnajmi merged 3 commits intomicrosoft:mainfrom
Saadnajmi:zx-to-node
Feb 24, 2026
Merged

ci: convert publish-if-needed script back to plain node#4017
Saadnajmi merged 3 commits intomicrosoft:mainfrom
Saadnajmi:zx-to-node

Conversation

@Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Feb 23, 2026

Description of changes

Our publish pipeline failed because this look couldn't find zx:

  yarn workspaces foreach --all --topological --no-private \
    exec zx $(Build.SourcesDirectory)/.github/scripts/publish-package-if-needed.mts

The issue is that zx is installed for our root monorepo, but the yarn foreach loop executes the command with the cwd as the package root. We can either add zx as a developer dependency (either manually or through or dynamic deps yarn plugin), or we can convert the script back to plain node. Given this script is in the critical path of publish and I am not confident on making zx a required dependency, I'm electing to convert back to node.

While here, also fix some incorrect yaml in the publish pipeline

Verification

CI should pass. I've also added an "NPM Publish Dry Run" PR check to Github Actions.

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

@changeset-bot
Copy link

changeset-bot bot commented Feb 23, 2026

⚠️ No Changeset found

Latest commit: 6a3c59c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Saadnajmi Saadnajmi changed the title ci: convert script back to plain node ci: convert publish-if-needed script back to plain node Feb 23, 2026
@Saadnajmi Saadnajmi enabled auto-merge (squash) February 24, 2026 03:58
@Saadnajmi Saadnajmi merged commit 9ea203f into microsoft:main Feb 24, 2026
13 checks passed
@Saadnajmi Saadnajmi deleted the zx-to-node branch February 24, 2026 14:29
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.

2 participants