Skip to content

ci: automate npm publish on GitHub Release (OIDC + provenance) - #11

Merged
seanpk merged 1 commit into
masterfrom
ci/release-workflow
Jun 16, 2026
Merged

seanpk merged 1 commit into
masterfrom
ci/release-workflow

Conversation

@seanpk

@seanpk seanpk commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Automates publishing so releases are intentional and tokenless.

Trigger: a published GitHub Release (tag vX.Y.Z).
What it does: verifies the tag matches package.json, runs lint + full test, then npm publish --provenance --access public.
Auth: npm Trusted Publishing (OIDC) — no NPM_TOKEN secret. Requires a one-time trusted-publisher config on npmjs (documented in docs/RELEASING.md).

Why a Release rather than "publish on every merge to master": merges happen for docs/refactors too, and publishing on each would fail whenever the version wasn't bumped. Tying publishes to a Release keeps versions deliberate.

Includes docs/RELEASING.md (one-time setup + the bump-via-PR → Release flow, since master is now protected) and a README pointer.

🤖 Generated with Claude Code

Automate releases without a long-lived NPM_TOKEN: when a GitHub Release
(tag vX.Y.Z) is published, the workflow verifies the tag matches
package.json, runs lint + the full test suite, and publishes with
provenance using npm Trusted Publishing (OIDC).

- .github/workflows/release.yml — release-triggered publish job.
- docs/RELEASING.md — one-time npm trusted-publisher setup and the
  bump-via-PR → GitHub Release flow (master is protected).
- README points at RELEASING.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@seanpk
seanpk merged commit 59ee240 into master Jun 16, 2026
4 checks passed
@seanpk
seanpk deleted the ci/release-workflow branch June 16, 2026 22:25
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.

1 participant