Conversation
There was a problem hiding this comment.
Pull request overview
Updates the npm publish GitHub Actions workflow, seemingly to support a more automated package publish process (and possibly OIDC/trusted publishing) for the repository’s dist outputs.
Changes:
- Added workflow-level GitHub Actions permissions (
id-token: write,contents: read). - Replaced the explicit per-package
npm publish --access publicsteps with a loop that findspackage.jsonfiles under./distand publishes vianpm publish --workspace=....
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| permissions: | ||
| id-token: write | ||
| contents: read |
There was a problem hiding this comment.
The workflow-level permissions block grants id-token: write, but this job also defines its own permissions (lines 15-17) which overrides the workflow defaults. As written, the build job will NOT receive id-token: write, so any OIDC/trusted-publishing flow will fail. Consider either adding id-token: write to the job permissions, or removing the job-level permissions block if it’s not needed.
| - name: Publish packages | ||
| run: | | ||
| find ./dist -name "package.json" -not -path "*/node_modules/*" -exec dirname {} \; | while read dir; do | ||
| npm publish --workspace="${dir}" |
There was a problem hiding this comment.
npm publish --workspace="${dir}" is likely incorrect here: the directories under ./dist are not declared as npm workspaces (root package.json only includes packages/*), so this may fail with “no matching workspace” or publish the wrong thing. Also, the previous workflow used --access public and an auth token; this new step doesn’t pass --access public (needed for scoped public packages) or any explicit auth mechanism unless you’re relying on npm trusted publishing (which would also require the correct id-token permission and usually --provenance). Recommend publishing by running npm publish with the needed flags from within each dist/... directory, and ensuring authentication/provenance is configured intentionally.
| npm publish --workspace="${dir}" | |
| (cd "$dir" && npm publish --provenance --access public) |
No description provided.