Skip to content

chore(release): publish to npm from a GitHub release's tag - #61

Merged
afterimaginary merged 3 commits into
mainfrom
chore/prepublish
Oct 26, 2026
Merged

afterimaginary merged 3 commits into
mainfrom
chore/prepublish

Conversation

@afterimaginary

@afterimaginary afterimaginary commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Part of #19 and #20. The first publish itself is left to the maintainer.

Summary

Sets up releasing in its simplest form. Publishing a GitHub release from main is the whole process: its vX.Y.Z tag sets the version, CI publishes to npm through trusted publishing, so no token is stored, and the release notes GitHub generates are the changelog. It also adds SECURITY.md and fixes what a pre-publish audit of the docs turned up.

Changes

  • .github/workflows/release.yml runs when a release is published:
    1. It fails unless the tag is a plain vX.Y.Z on a commit in main. This blocks a prerelease going out as latest, and stops pnpm reading a tag like vmajor as a bump.
    2. It sets the version from the tag without committing it.
    3. It runs verify.
    4. It runs pnpm publish. With trusted publishing, pnpm attaches provenance itself.
    • Checkout keeps no credentials. Actions are pinned by SHA, as in verify.yml.
  • ADR-0007 records the decision. package.json stays at 0.0.0 in the repository, there's no CHANGELOG, and the unused bumpp dev dependency is removed.
  • CONTRIBUTING gains a Releasing section, including the one-time setup: publish the 0.0.0 placeholder by hand, add release.yml as the trusted publisher, then create the first release within npm's two-day window.
  • Audit fixes:
    • SECURITY.md, which asks for reports through GitHub's private vulnerability reporting;
    • the agent pilot doc uses the past tense for the old hook and links the harness at the agent-benchmark-pilot tag;
    • the rule doc says where the ADRs it cites are;
    • CONTRIBUTING lists simulate-hints;
    • package.json has more keywords.

Verification

  • vp run ready (the pre-push hook) passes, with all 107 tests, after rebasing onto feat(checker): run as a Claude Code hook with --claude-code-hook #60.
  • In a clean worktree, vp pm version 0.1.0 -- --no-git-tag-version bumped package.json without making a commit or a tag. vp pm publish --dry-run --no-git-checks built the package and stopped before publishing.
  • The tag check accepts v1.2.3 and rejects v1.0.0-rc.1.
  • /refine found no P0 or P1 issues. Its P2 findings (no check that the tag is on main, prereleases published as latest) and its P3 findings are fixed.
  • Not verified: the workflow itself. Trusted publishing needs the package on npm, and provenance needs the repository to be public.

Observations

afterimaginary and others added 3 commits October 26, 2026 10:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@afterimaginary
afterimaginary marked this pull request as ready for review October 26, 2026 18:47
@afterimaginary
afterimaginary merged commit d757dac into main Oct 26, 2026
1 check passed
@afterimaginary
afterimaginary deleted the chore/prepublish branch October 26, 2026 18:48
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