Skip to content

Release workflow: version dropdown + publish to public npm with provenance - #24

Merged
jonathanKingston merged 3 commits into
mainfrom
claude/version-bump-release-workflow-vfndpl
Jul 5, 2026
Merged

jonathanKingston merged 3 commits into
mainfrom
claude/version-bump-release-workflow-vfndpl

Conversation

@jonathanKingston

Copy link
Copy Markdown
Collaborator

Follow-up to #20, refining the release workflow.

Changes

  • Version input is now a dropdown. The free-text version field is replaced by a bump choice input (patch / minor / major / prepatch / preminor / premajor / prerelease) plus an optional exact_version text field that overrides the dropdown when set. GitHub Actions choice inputs can only offer a fixed list, so the override preserves the ability to pin an exact version.

  • Publish target switched from GitHub Packages to public npm. @copse is the org's npm scope and the README already documents npm install @copse/streaming-markdown. GitHub Packages would have forced an @copse-dev rename and required consumers to authenticate even to install. So:

    • setup-node registry-urlregistry.npmjs.org
    • publish authenticates with the NPM_TOKEN secret (not GITHUB_TOKEN)
    • publishConfig pins the public registry + access: public for the scoped package
    • dropped the now-unneeded packages: write permission
  • npm provenance. Added id-token: write and npm publish --provenance so releases carry a signed attestation (via GitHub OIDC) linking the package to its source commit and build, shown as a verified badge on npm.

Prerequisite

Requires an NPM_TOKEN repo secret — a granular access token scoped to the @copse scope with publish rights (scope-level so it can create the package on first publish). Added.

Validation

Ran the full pre-publish pipeline locally against a clean install: CI gate green (428/428 tests, typecheck, build), version resolve (patchv0.1.2), changelog correctly scoped to commits since v0.1.1, and npm publish --dry-run tarball ships only dist/ + README.md + LICENSE. The live publish + provenance run only inside Actions (needs the OIDC token).

🤖 Generated with Claude Code


Generated by Claude Code

claude added 3 commits July 5, 2026 12:12
Replace the free-text `version` input with a `bump` choice dropdown
(patch/minor/major/prepatch/preminor/premajor/prerelease) plus an optional
`exact_version` text field that overrides the dropdown when set. The resolve
step prefers the exact version when provided, otherwise applies the bump.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GybqjwKSadmFZv4cxE5Y5N
@copse is the org's npm scope, and the README already documents
`npm install @copse/streaming-markdown` (a public-npm install). GitHub
Packages would force an @copse-dev rename and require consumers to auth even
to install, so target public npm instead:

- setup-node registry-url -> registry.npmjs.org
- publish authenticates with the NPM_TOKEN secret (not GITHUB_TOKEN)
- publishConfig pins the public registry + access:public for the scoped package
- drop the now-unneeded `packages: write` permission

Requires an NPM_TOKEN repo secret with publish rights on the @copse scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GybqjwKSadmFZv4cxE5Y5N
Add id-token: write and `npm publish --provenance` so releases carry a signed
provenance attestation (via GitHub OIDC) linking the package to its source
commit and build, surfaced as a verified badge on npm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GybqjwKSadmFZv4cxE5Y5N
@jonathanKingston
jonathanKingston merged commit ce3c896 into main Jul 5, 2026
1 check passed
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