-
Notifications
You must be signed in to change notification settings - Fork 0
fix: add production environment to release-please workflow for npm publishing #84
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
- Rename @peerbot/cli to create-peerbot package - Update binary from peerbot to create-peerbot - Update all documentation to use npm create peerbot - Update GitHub Actions to publish create-peerbot - Supports both npm create peerbot and npx create-peerbot
…blishing The NPM_TOKEN is stored in the production environment secrets, but the release-please workflow wasn't configured to use that environment. This prevented npm packages from being published when releases were created. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Create .env file | ||
| await renderTemplate(".env.tmpl", variables, join(cwd, ".env")); | ||
|
|
||
| // Append MCP environment variables if any were selected | ||
| if (answers.selectedMcpServers.length > 0) { | ||
| const requiredEnvVars = getRequiredEnvVars(answers.selectedMcpServers); | ||
| if (requiredEnvVars.length > 0) { | ||
| let mcpEnvContent = "\n# MCP Server Credentials\n"; | ||
| mcpEnvContent += | ||
| "# Add your OAuth client secrets and API keys below:\n"; | ||
|
|
||
| for (const varName of requiredEnvVars) { | ||
| mcpEnvContent += `# ${varName}=your_${varName.toLowerCase()}_here\n`; | ||
| } | ||
|
|
||
| const envPath = join(cwd, ".env"); | ||
| const currentContent = await readFile(envPath, "utf-8"); | ||
| await writeFile(envPath, currentContent + mcpEnvContent); | ||
| } | ||
| } | ||
|
|
||
| // Create .gitignore | ||
| await renderTemplate(".gitignore.tmpl", {}, join(cwd, ".gitignore")); |
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.
Restore missing templates required by init command
The new initCommand renders .env.tmpl and .gitignore.tmpl via renderTemplate, but the templates directory now only contains Dockerfile and README templates. At runtime this call will throw an ENOENT before any files are created, causing create-peerbot to fail immediately for every user. Either add these template files back or stop referencing them.
Useful? React with 👍 / 👎.
| { | ||
| "name": "@peerbot/cli", | ||
| "name": "create-peerbot", | ||
| "version": "0.1.0", | ||
| "description": "CLI for deploying and managing Peerbot across multiple platforms", | ||
| "type": "module", | ||
| "main": "dist/index.js", | ||
| "bin": { | ||
| "peerbot": "./bin/peerbot.js" | ||
| "create-peerbot": "./bin/create-peerbot.js" | ||
| }, |
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.
Provide an actual CLI executable for the published package
The package metadata still advertises a binary at ./bin/create-peerbot.js, but the repository no longer contains a bin directory or that file. After publishing, npx create-peerbot will fail with a "file not found" error because Node cannot locate the executable. Point the bin entry at a real built file (e.g. dist/index.js) or reintroduce the missing script before publishing.
Useful? React with 👍 / 👎.
|
Claude finished @buremba's task —— View job PR Review AnalysisI'll provide a comprehensive review of this PR that adds production environment configuration for npm publishing. Todo List:
SummaryPrimary Issue: This PR correctly adds 🚨 Critical Issues (Must Fix Before Merge)1. Missing CLI Executable (P1)
2. Missing Template Files (P1)
✅ What Works WellWorkflow Security & Configuration
Package Renaming Consistency
🔍 Additional ObservationsBuild Process
Template Architecture ChangeThe refactor simplified from complex config-driven templates to simple Docker Compose approach:
🛠️ Recommended ActionsBlock Merge Until Fixed:
After Fixes:
Security: No concerns - environment approach is secure and follows best practices. |
Summary
environment: productionto the release-please workflow jobContext
The NPM_TOKEN is stored in the production environment secrets, but the release-please workflow wasn't configured to use that environment. This prevented npm packages (
create-peerbotand@peerbot/worker) from being published when releases were created.Test Plan
npm view create-peerbotandnpm view @peerbot/workerreturn the published packages🤖 Generated with Claude Code