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
- 所属仓库
- jd-solanki/airig
- 最近更新
- 2026-07-11
- Stars
- ★ 2
- 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.yml918 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-great-skills
Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.
to-prd
Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.
to-issues
Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
review
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
nostics
Structured diagnostic code library for JavaScript/TypeScript. Turns errors and other conditions into typed, machine-readable `Diagnostic` instances with stable codes, docs URLs, and actionable fields. Use this skill whenever the project imports `nostics`, or works with `defineDiagnostics`/`defineProdDiagnostics`, the `Diagnostic` class, diagnostic code registries, or structured error handling. Also covers reporters (`createConsoleReporter`, `createFetchReporter` from nostics/reporters/fetch, `createFileReporter` from nostics/reporters/node, `createDevReporter` from nostics/reporters/dev), formatters (`formatDiagnostic`, `ansiFormatter`, `jsonFormatter`), and Vite plugins (`nosticsStrip` from @nostics/unplugin/strip-transform, `nosticsCollector` from @nostics/unplugin/dev-server-collector). Also use when migrating a library's existing `console.warn`/`console.error`/`warn()` helpers or thrown `Error`s to diagnostics: follow `references/migration.md`.