ci: add automated semantic-release publishing#3
Merged
Conversation
On every push to main, gate on the full test suite, then run semantic-release: it reads the conventional-commit PR title since the last vX.Y.Z tag, decides the lockstep version bump, tags + creates a GitHub Release, stamps that version across all workspaces (rewriting internal @sharptrick/parley-* ranges), and publishes every public package to npm with provenance via trusted publishing (OIDC, no token). - .releaserc.json + scripts/stamp-version.mjs + scripts/publish-workspaces.mjs (idempotent: skips versions already on the registry) - publish-manual.yml: workflow_dispatch escape hatch for new-package first-publish and partial-release recovery - pr-title.yml: enforce conventional PR titles (the squash subject that drives the bump) - docs: "Releases & versioning" in CONTRIBUTING.md, "Releases" note in CLAUDE.md No version is committed back; the git tag + npm are the source of truth. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automates npm publishing so a merge to
mainis a release.What this does
On every push to
main: run the full test gate →semantic-releasereads the conventional-commit PR title since the lastvX.Y.Ztag, decides the lockstep bump, tags + creates a GitHub Release, stamps that version across all workspaces (rewriting internal@sharptrick/parley-*ranges), and publishes every public package to npm with provenance via trusted publishing (OIDC — noNPM_TOKEN).No version is committed back; the git tag + npm are the source of truth.
Files
.github/workflows/release.ymlmain.releaserc.json@semantic-release/npm/git→ no commit-back)scripts/stamp-version.mjsscripts/publish-workspaces.mjs.github/workflows/publish-manual.ymlworkflow_dispatchfor new-package first-publish + partial-release recovery.github/workflows/pr-title.ymlCONTRIBUTING.md/CLAUDE.mdBump rules (PR title)
feat:→minor ·fix:/perf:/revert:→patch ·feat!:/BREAKING CHANGE:→major ·docs:/chore:/ci:/…→no release. Pre-1.0: avoid!(jumps to1.0.0).Merging this PR
Titled
ci:on purpose, so merging it will not cut a release. After merge:lint-titleas a required status check:gh api --method POST repos/sharpTrick/parley/branches/main/protection/required_status_checks/contexts -f 'contexts[]=lint-title'v0.1.0baseline tag pushed, all 12 packages on npm, branch protection + squash-only enforced. Remaining: configure the trusted publisher for each of the 12 packages on npmjs.com (reposharpTrick/parley, workflowrelease.yml) before the first real release.🤖 Generated with Claude Code