automate-npm-release
Automate npm package publishing via GitHub Actions for single-package repos and independent monorepo packages, including bumpp version tags, GitHub release notes, trusted publishing, provenance, and package-scoped release tags. Use when setting up or modifying npm publish workflows, npm release pipelines, version bumping, package-scoped monorepo releases, changelogithub release notes, trusted publishing, provenance badges, NPM_TOKEN, or OIDC publishing.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- automate-npm-release
- description
- Automate npm package publishing via GitHub Actions for single-package repos and independent monorepo packages, including bumpp version tags, GitHub release notes, trusted publishing, provenance, and package-scoped release tags. Use when setting up or modifying npm publish workflows, npm release pipelines, version bumping, package-scoped monorepo releases, changelogithub release notes, trusted publishing, provenance badges, NPM_TOKEN, or OIDC publishing.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档EXAMPLE_WORKFLOW.yml923 B
- 参考文档MONOREPO_WORKFLOW.yml4.5 KB
- 参考文档MONOREPO.md3.2 KB
- 参考文档SINGLE_PACKAGE.md1.1 KB
03 SKILL.md 正文
Automate npm Release
Use this skill to set up npm release automation. First identify the repository shape, then load the matching reference:
- Single publishable package: see SINGLE_PACKAGE.md.
- Workspace monorepo with independently published packages: see MONOREPO.md.
Shared rules
- npm requires the first publish to be done manually for each public package:
npm publish --access public
- Prefer npm trusted publishing/OIDC when the project asks for it. Configure the package on npmjs.com after the first manual publish, then use
id-token: writein GitHub Actions. Ensurepackage.jsonhasrepository.urlexactly matching the GitHub repo URL (case-sensitive) — required for provenance validation. - If using token-based publishing, configure
actions/setup-nodewithregistry-url: https://registry.npmjs.orgsoNODE_AUTH_TOKENcan authenticatenpm publish. - In pnpm workspaces, publish via
pnpm packfollowed bynpm publish <tarball> --access public. This lets pnpm rewriteworkspace:*dependencies while npm handles trusted publishing/OIDC. Use changelogithub only for GitHub release notes/releases. - Always run checks, tests, and package builds before publishing.
- Keep the private workspace root unpublished; publish from the actual package directory.
Quick choice
Use single-package release automation when one package.json owns the npm artifact and one v* tag maps to one package.
Use monorepo release automation when multiple workspace packages publish independently. In that flow, tags must encode the package, such as cli-v0.1.0, and GitHub release-note generation must use explicit previous same-package tag ranges.
Workflow examples
- EXAMPLE_WORKFLOW.yml — single-package token/provenance workflow.
- MONOREPO_WORKFLOW.yml — package-scoped monorepo workflow using trusted publishing and changelogithub.
04 同仓库更多 Skills
writing-for-humans
How to write a short document a person has to read and act on - a ticket, a pull request body, a commit message, a handover note. Covers the title, a shape people skim, evidence that survives a refactor, and stripping the AI phrasing out. Call it before drafting any of those.
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
node-cli
Patterns and conventions for building Node.js CLI tools — src structure, entry point setup, Commander wiring, and update notifications. Use when creating or modifying a Node.js CLI, adding Commander commands, wiring update-notifier, or asking how to structure a CLI entry point or src directory.
humanizer
Removes traces of AI-generated text. Suitable for editing or reviewing text to make it sound more natural and human-written. Based on the comprehensive Wikipedia guide on "AI writing characteristics." Detects and fixes patterns such as: exaggerated symbolism, promotional language, superficial analysis ending in "-ing," vague attribution, overuse of dashes, the rule of three, AI-typical vocabulary, negative parallelism, and excessive transitional phrases.
create-ticket
Draft one small, plain ticket as a markdown file, then file it on the project's tracker once the user approves.
create-pr
Open one pull request as a draft, with a body the reviewer can act on.