Reverts the change that added .npmrc creation logic to 'scripts/prepare-github-release.js'.
This logic was incorrectly overwriting the .npmrc file that is correctly configured by the 'Configure npm for GitHub Packages' step in the 'build-and-publish.yml' workflow, leading to authentication failures during npm publish.
The workflow itself already handles the .npmrc creation correctly, and this revert ensures that the correct authentication token is preserved.
Updates the 'prepare-github-release.js' script to create an '.npmrc' file in the root directory.
This ensures that the 'npm publish' command is properly authenticated with the GitHub Packages registry, preventing the 'ENEEDAUTH' error during the publish step.
This commit unifies the bundling and publishing process for the CLI package across both npmjs.org and GitHub Packages.
- The script has been updated to only rename packages for the GitHub registry, removing the bundle copying and package.json modification logic.
- The has been modified to remove the flag from the CLI publish step, ensuring the root package (which includes the bundled executable) is published.
This ensures a consistent, bundled artifact is published to both registries.