ci: add workflow_dispatch and build step to npm-publish#86
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Restores the manual "Run workflow" button on GitHub Actions page. Also adds missing `npm run build` step before publish. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> AI-Agent: Claude-Code/2.1.42 AI-Model: claude-opus-4-6 AI-Decision: The npm publish workflow should run 'npm run build' after 'npm ci' but before 'npm publish' to ensure built artifacts are included in the published package. AI-Confidence: high AI-Tags: ci-cd, npm-publish, build-process, github-actions, workflow-dispatch, manual-trigger, build-order AI-Lifecycle: project AI-Memory-Id: c15bde7d AI-Source: llm-enrichment
ac3d3ba to
194fc43
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated GitHub Actions workflow for manual / release-triggered npm publishing, and updates project docs and metadata to reflect recent feature additions (multi-provider LLM support, new CLI commands, and new hooks).
Changes:
- Add
.github/workflows/npm-publish.ymlwithworkflow_dispatchand an explicitnpm run buildbeforenpm publish. - Update docs/README/CLAUDE.md/CHANGELOG.md content around trailers, hooks, and multi-provider LLM configuration.
- Adjust an integration test to use
GIT_MEM_MODELinstead ofANTHROPIC_MODELunderCLAUDECODE.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/hooks/hook-commit-msg.test.ts | Makes model detection test more stable by using higher-priority GIT_MEM_MODEL. |
| package.json | Updates package version/description (but conflicts with semantic-release flow). |
| docs/getting-started.md | Expands docs for trailers and multi-provider LLM configuration / env vars. |
| README.md | Adds an image to the README. |
| CLAUDE.md | Updates architecture/entrypoint documentation to reflect new commands and hook handlers. |
| CHANGELOG.md | Updates release notes for 0.5.0 and adds new bullets. |
| .github/workflows/npm-publish.yml | Adds a publish workflow with manual trigger and build-before-publish. |
Comments suppressed due to low confidence (2)
.github/workflows/npm-publish.yml:20
- Repo workflows consistently use Node.js 22 (ci.yml, release-on-merge.yml). This workflow pins Node 20 and also omits the
cache: 'npm'setting used elsewhere, which increases CI time and can hide Node-version-specific issues. Alignnode-versionwith the rest of the repo and enable npm caching via setup-node.
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test
.github/workflows/npm-publish.yml:2
- The header comment says this publishes to GitHub Packages, but the job config uses the npm registry (
registry-url: https://registry.npmjs.org/) and runsnpm publish. Update the comment to avoid confusion about where artifacts are being published.
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| release: | ||
| types: [created] | ||
| workflow_dispatch: | ||
|
|
There was a problem hiding this comment.
This workflow triggers on release: created, but the repo already publishes via semantic-release on push to main (release-on-merge.yml) and creates GitHub releases. When semantic-release creates a release, this workflow will also run and attempt a second npm publish, which will likely fail (version already published) and adds operational noise. Consider removing the release trigger and keeping only workflow_dispatch, or otherwise ensure it won’t double-publish (e.g., guard conditions / use a different registry or artifact source).
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| workflow_dispatch: |
Summary
workflow_dispatchtrigger to restore the manual "Run workflow" button on GitHub Actionsnpm run buildstep beforenpm publishTest plan
🤖 Generated with Claude Code