-
Notifications
You must be signed in to change notification settings - Fork 9
chore: call npm whoami and npm config get registry during publish
#89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe updates to the npm publish workflow in Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Actions Workflow
participant NPM as NPM Registry
participant User as NPM User
Workflow->>User: Check npm user configuration
User-->>Workflow: Configuration Details
Workflow->>NPM: Check npm registry configuration
NPM-->>Workflow: Registry Details
Workflow->>Workflow: Verify configurations
Workflow->>NPM: Perform dry run publish
NPM-->>Workflow: Dry run results
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
npm whoami during publishnpm whoami and npm config get registry during publish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Files selected for processing (1)
- .github/workflows/npm-publish.yaml (1 hunks)
Additional comments not posted (1)
.github/workflows/npm-publish.yaml (1)
50-52: Review of added npm commandsThe integration of
npm whoamiandnpm config get registrycommands with error handling is well done. These commands enhance the robustness of the publish process by ensuring the npm user and registry configuration are correct before proceeding with the publish operation. The use of conditional exits (exit 1) ensures that the workflow will halt if these commands fail, which is a critical safeguard.This implementation addresses the previous comment by ensuring that the workflow fails gracefully if the environment is not correctly configured. Thus, the changes are appropriate and improve the reliability of the deployment process.
Towards #29
Changes
npm whoamiandnpm config get registryduring publishSummary by CodeRabbit