ci: add release-please changelog and release notes generation - #13
Merged
Merged
Conversation
CI report
Ref: |
lloydsk
force-pushed
the
ci/release-please-changelog
branch
from
September 21, 2026 00:40
8d8e916 to
702b35e
Compare
Version bumps, CHANGELOG.md, and GitHub Release notes now come from release-please, driven by Conventional Commits. A new check rejects a PR title release-please cannot parse, so a change that would be dropped from the changelog fails loudly instead of vanishing. release.yml is deliberately untouched. A PAT-created Release carries a user identity, so its existing `release: published` trigger fires and npm publishes over OIDC exactly as before. Under GITHUB_TOKEN that event is suppressed, and avoiding it would have meant chaining release.yml as a reusable workflow — plus registering release-please.yml as a second npm trusted publisher on both packages, since npm validates a workflow_call publish against the CALLING workflow's filename. One secret replaces all of that machinery. pr-title.yml enforces the message that actually reaches main. scripts/check-conventional-commit.ts takes its type vocabulary from release-please-config.json's changelog-sections, so there is one source of truth rather than two lists that drift, and it fails closed on an unusable config. `include-component-in-tag: false` is required: the manifest default searches for pi-background-run-vX.Y.Z, which matches none of this repo's vX.Y.Z tags. `bump-minor-pre-major` keeps a breaking change from ending pre-release status by accident. Requires one repository secret, RELEASE_PLEASE_TOKEN. `main` requires the `lint-test` check and enforce_admins is true, so there is no bypass, and GITHUB_TOKEN-created events start no workflow run — a GITHUB_TOKEN Release PR can never report lint-test and so can never be merged. The workflow falls back to GITHUB_TOKEN until the secret exists, so Release PRs still open meanwhile. Scope the PAT to this repository: contents: write + pull_requests: write. docs/releasing.md also records the merge settings, which are currently wrong for this design: squash_merge_commit_title is COMMIT_OR_PR_TITLE, so a single-commit PR squashes to the branch commit's title rather than the PR title — which pr-title.yml never sees.
lloydsk
force-pushed
the
ci/release-please-changelog
branch
from
September 21, 2026 01:03
702b35e to
253fb54
Compare
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.
Adds release-please so version bumps,
CHANGELOG.md, and GitHub Release notes derive from Conventional Commits — plus a check so a PR title release-please cannot parse fails loudly instead of silently dropping a changelog entry.What's here
release-please.yml— keeps one Release PR open. Merging it tags the commit, creates the Release with generated notes, and firesrelease.ymlto publish to npm.pr-title.yml+scripts/check-conventional-commit.ts— enforces Conventional Commits on the message that actually reachesmain.release-please-config.json/.release-please-manifest.json— release type, tag format, changelog sections, last released version.docs/releasing.md— the process and the settings.Deliberately NOT touched
release.ymlis unchanged. A PAT-created Release carries a user identity, so its existingrelease: publishedtrigger fires normally and npm publishes over OIDC exactly as before.Under
GITHUB_TOKENthat event is suppressed, and working around it would have meant chainingrelease.ymlas a reusable workflow — plus registeringrelease-please.ymlas a second npm trusted publisher on both packages, because npm validates aworkflow_callpublish against the calling workflow's filename. One secret replaces that entire apparatus, so npm trusted publishing needs no changes.Two design points worth reviewing
The type vocabulary is derived, not duplicated. The checker reads valid types from
release-please-config.json'schangelog-sections, so adding a type there immediately permits it in a title. release-please's schema isadditionalProperties: false, so a custom key wasn't an option. It fails closed on an unusable config.include-component-in-tag: falseis required. The manifest default searches forpi-background-run-vX.Y.Z, which matches none of this repo'svX.Y.Ztags — the run fails rather than guessing.One secret required
RELEASE_PLEASE_TOKEN— a fine-grained PAT scoped to this repo with Contents: Read and write + Pull requests: Read and write.mainrequireslint-testandenforce_adminsistrue, so there is no bypass. GITHUB_TOKEN-created events start no workflow run, so aGITHUB_TOKENRelease PR can never reportlint-testand can never be merged. Discovered via a rejected direct push (GH006: … Required status check "lint-test" is expected), not assumed.The workflow falls back to
GITHUB_TOKENif the secret is unset, so it degrades to "Release PRs open but cannot be merged" rather than failing outright. A PAT expires, so it needs periodic rotation — a GitHub App token would avoid that if the org is willing to own one.Also worth fixing (outside the repo)
Merge settings are wrong for this design —
squash_merge_commit_titleisCOMMIT_OR_PR_TITLE, which means the commit's title if only one commit, so a single-commit PR squashes to the branch commit's message andpr-title.ymlnever sees it.allow_merge_commitandallow_rebase_mergeare also both stilltrue.gh api -X PATCHone-liner indocs/releasing.md.Verification
feat:,fix(ci):,feat!:,feat(scope)!:), squash suffixes, multi-line bodies, and 10 rejections (Feat:,feat:no space,feat:,feat():,fix (ci):, unknown type, empty). Includes the real repo commitAddress review findings; bound bggrep matching (#11), which it blocks.actionlintclean on all workflows;tsc --noEmitclean (now coversscripts/);npm packstill 7 files, so ci.yml's allowlist assertion is untouched.release.ymlverified byte-identical tomain(git diff main -- .github/workflows/release.ymlis empty).