Publish the package to npmjs by bumping version, building, and creating a GitHub release
Add this skill
npx mdskills install nikicat/publish-npmComprehensive npm publish workflow with semver analysis, CI verification, and safety checks
1---2name: publish-npm3description: Publish the package to npmjs by bumping version, building, and creating a GitHub release4argument-hint: "[patch|minor|major]"5---67Publish the mcp-wallet-signer package to npmjs via GitHub release.89The argument is an optional semver bump type: `patch`, `minor`, or `major`. If not provided, recommend one based on the diff (see step 1).1011## Steps1213### 1. Analyze changes and bump version14151. Read the `npm.version` field from `deno.jsonc` to get the current version.162. Find the latest version tag with `git describe --tags --abbrev=0 --match 'v*'`.173. Run `git log <tag>..HEAD --oneline` to get the commit list since that tag.184. Based on the commits and diff, recommend a bump type:19 - **patch**: bug fixes, formatting, docs, dependency bumps, CI changes20 - **minor**: new features, new API surface, new tools/commands21 - **major**: breaking changes to public API, removed exports, changed behavior225. Show the user: the commit list, your recommended bump type with reasoning, and the resulting version. Ask for confirmation, offering all three bump types as options with your recommendation marked.2324### 2. Build the npm package (smoke test)2526Run `deno task build:npm` to verify the build succeeds before pushing. This runs `scripts/build-npm.ts` which does the dnt transform and builds the web UI.2728### 3. Commit, tag, and push29301. Bump version in `deno.jsonc` (`npm.version`) and `server.json` (top-level `version` and `packages[0].version`).312. Stage and commit both files with message: `Bump version to <new-version>`322. Create a git tag: `v<new-version>`333. Push commit and tag: `git push && git push --tags`3435### 4. Wait for CI checks3637Wait for the CI workflow to pass on the pushed commit using `gh run watch $(gh run list --workflow=ci.yml --limit=1 --json databaseId --jq '.[0].databaseId')` with a timeout of 5 minutes.3839If CI fails, show the logs with `gh run view <run-id> --log-failed` and **stop** — do not create a release with failing checks.4041### 5. Create GitHub release4243Run:44```45gh release create v<new-version> --title "v<new-version>" --generate-notes46```4748This triggers the `publish.yml` GitHub Actions workflow which builds and publishes to npm with provenance.4950### 6. Wait for publish workflow5152Get the run ID from `gh run list --workflow=publish.yml --limit=1` and watch it with `gh run watch <run-id>`. Use a timeout of 5 minutes.5354If the workflow fails, show the logs with `gh run view <run-id> --log-failed` and stop.5556### 7. Verify package on npmjs5758Run `npm view mcp-wallet-signer version` and confirm the output matches `<new-version>`. If it doesn't, warn the user.59
Full transparency — inspect the skill content before installing.