Skip to content

feat: reusable npm-publish.yml with trusted publishing (OIDC) - #1

Open
beel-it wants to merge 2 commits into
masterfrom
npm-publish-oidc
Open

feat: reusable npm-publish.yml with trusted publishing (OIDC)#1
beel-it wants to merge 2 commits into
masterfrom
npm-publish-oidc

Conversation

@beel-it

@beel-it beel-it commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

What

  • New reusable workflow .github/workflows/npm-publish.yml: publishes one or more npm packages from the calling ref with trusted publishing (OIDC) and provenance, after a verify script passes, behind a GitHub environment with required reviewers.
  • Idempotent: versions already on npm are skipped, so a failed run can be retried without burning a version.
  • Works with npm or pnpm, single packages (require-tag checks v<version> = package.json) and monorepos (packages: a b).
  • The old npm-publish composite is documented as deprecated (long-lived token, automatic bumps, continues on failing tests). Kept for existing references.

Why

Every npm package of the organization publishes in a slightly different way. This generalizes the pattern already used by beel-mcp so each repository only keeps a ten-line caller workflow, and no repository needs an npm token.

Tests

Workflow linted with actionlint locally. First consumer to follow in a separate repository.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants