一键导入
release
Full npm release workflow - version bump, commit, tag, push, GitHub release. Use when publishing to npm, creating a release, or shipping a new version.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Full npm release workflow - version bump, commit, tag, push, GitHub release. Use when publishing to npm, creating a release, or shipping a new version.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | release |
| description | Full npm release workflow - version bump, commit, tag, push, GitHub release. Use when publishing to npm, creating a release, or shipping a new version. |
| model | claude-opus-4-5-20251101 |
| context | fork |
| allowed-tools | ["Read","Edit","Write","Glob","Grep","Bash(npm:*)","Bash(git:*)","Bash(gh:*)","Bash(node:*)","Bash(echo:*)","Bash(sleep:*)","AskUserQuestion"] |
| hooks | {"PreToolUse":[{"matcher":"Bash","hooks":[{"type":"command","command":"git status --porcelain"}],"once":true}]} |
Complete npm release workflow that handles version bumping, git operations, and GitHub releases in the correct order to trigger automatic npm publishing.
Use when user says: "release", "publish", "ship it", "create release", "npm publish", "/release"
The workflow MUST follow this exact sequence to ensure npm publishing works:
1. Version Bump (all files)
2. Build & Test
3. Git Commit (version changes)
4. Git Tag (annotated)
5. Push Commits to main
6. Push Tag to origin
7. Create GitHub Release (triggers npm publish)
8. Verify npm publication
9. Auto-update global installation
deploy.yml workflow only runs npm publish when github.ref starts with refs/tags/vBefore starting, verify:
# 1. Clean working directory (or only version-related changes)
git status
# 2. On main branch
git branch --show-current
# 3. GitHub CLI authenticated
gh auth status
# 4. Current versions in sync
echo "package.json: $(node -p "require('./package.json').version")"
echo "CLI source: $(grep "const VERSION" src/cli/index.ts | grep -oP "'[^']+'" | tr -d "'")"
echo "README: $(grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+' README.md | head -1)"
echo "docs/index: $(grep -oP '"softwareVersion": "[^"]+"' docs/index.html | grep -oP '[0-9]+\.[0-9]+\.[0-9]+')"
ALL of these MUST be updated to the same version:
| File | Line | Pattern |
|---|---|---|
package.json | 3 | "version": "X.Y.Z" |
src/cli/index.ts | 18 | const VERSION = 'X.Y.Z'; |
README.md | 12 | > **vX.Y.Z**: |
docs/index.html | 45 | "softwareVersion": "X.Y.Z" |
Ask user for version type if not specified:
Or accept explicit version like "2.1.0".
Update each file with the new version (see Version Locations table).
npm install --package-lock-only
npm run build
npm test
Verify CLI version:
node dist/cli.js --version
git add package.json package-lock.json src/cli/index.ts README.md docs/index.html
git commit -m "chore: release vX.Y.Z"
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin main
git push origin vX.Y.Z
gh release create vX.Y.Z \
--title "vX.Y.Z" \
--generate-notes
This triggers the GitHub Actions workflow which:
Wait 2-3 minutes, then verify:
# Check GitHub Actions status
gh run list --limit 1
# Check npm registry (after CI completes)
npm view @henkisdabro/mcp-selector version
After verifying npm publication, automatically update the global installation:
# Wait for npm registry to propagate (90 seconds - CI takes ~60-75s)
echo "Waiting 90 seconds for npm registry propagation..."
sleep 90
# Verify the new version is available on npm
npm view @henkisdabro/mcp-selector version
# Update global installation
echo "Updating global installation..."
npm install -g @henkisdabro/mcp-selector@X.Y.Z
# Verify global installation
mcp --version
This ensures the local development environment has the latest released version available globally.
| Change Type | Bump | Example |
|---|---|---|
| Bug fix | Patch | Fix toggle logic bug |
| New feature (backwards compatible) | Minor | Add new CLI command |
| Breaking change | Major | Change CLI interface |
If something goes wrong:
# Delete local tag
git tag -d vX.Y.Z
# Delete remote tag (if pushed)
git push origin --delete vX.Y.Z
# Delete GitHub release (if created)
gh release delete vX.Y.Z --yes
# Revert commit (if needed)
git revert HEAD
git push origin main
npm publish locally - it won't work with trusted publishingmain branch--generate-notes for auto-generated changelog from PR titlesdeploy.yml for OIDC to workThis project uses npm Trusted Publishing (OIDC) which means:
henkisdabro/Claude-Code-MCP-Server-Selectordeploy.ymlIf version is already bumped and committed, just need to tag and release:
VERSION="X.Y.Z"
git tag -a "v${VERSION}" -m "Release v${VERSION}"
git push origin main
git push origin "v${VERSION}"
gh release create "v${VERSION}" --title "v${VERSION}" --generate-notes