Fix release workflow by marking root package as private #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The Release workflow was failing with a 404 error when attempting to publish packages to NPM:
The workflow was attempting to publish the root
supergrainpackage (unscoped) to NPM, which doesn't exist and shouldn't be published. Only the scoped packages (@supergrain/core,@supergrain/react,@supergrain/store) should be published.Solution
Added
"private": trueto the rootpackage.json. This tells pnpm to skip the root package when runningpnpm -r publish, ensuring only the publishable scoped packages are sent to NPM.Before:
{ "name": "supergrain", "version": "0.9.0", "description": "", ... }After:
{ "name": "supergrain", "version": "0.9.0", "private": true, "description": "", ... }Testing
Verified with
pnpm -r publish --dry-runthat only the three scoped packages will be published:@supergrain/core@0.1.0@supergrain/react@0.3.0@supergrain/store@0.1.0The root
supergrainpackage is correctly excluded from publishing.Documentation Updates
Updated NPM_SETUP.md and NPM_PUBLISHING_CHECKLIST.md to document that the root package is marked as private, helping future maintainers understand this configuration.
Answer to "Do I need to create the packages outside of GitHub?"
No! The GitHub Actions workflow is correctly configured. The only issue was the missing
"private": truefield. With this fix, the automated release workflow will work as designed:No manual package publishing is required.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.