ci(release): switch release-please to packages/cli component and add OIDC publish workflow#1183
Conversation
…OIDC publish workflow Repoints release-please manifest mode from repo-root to packages/cli with component-scoped tags, and adds .github/workflows/release.yml that publishes @council-ai/cli to npm via OIDC trusted publishing with provenance. Co-authored-by: Copilot <175574315+pedrofuentes@users.noreply.github.com>
|
Status: CONDITIONAL Sentinel Review ReportRef: ci/release-automation → main Phase 0 — BindingBound to PR #1183, branch Phase 1 — TDD / Test EvidencePR type =
Phase 1.5 — Fast-path Evaluation🔴 count: 0 | LOC: ~54 non-test (≤150: Y) | Security paths: Y (release/publish supply-chain workflow with Phase 2 — Execution Log
Selective dispatch per §Selective dispatch: Findings
Details (ordered by severity)
Verified-good (no findings)
Follow-ups & Actions
Decision rationale
|
|
Sentinel review CONDITIONAL (
|
Summary
T-P5: Switch release-please to proper monorepo/manifest mode targeting
packages/cli(the only publishable package), and add a tokenless OIDC + provenance npm publish workflow.Changes
release-please-config.json: Replaced the root.package entry withpackages/cli. Added"component": "cli"and"include-component-in-tag": trueso release tags are component-scoped (e.g.cli-v0.1.1), appropriate for a monorepo with one current publishable package plus future packages.release-type: node,bump-minor-pre-major: true,bump-patch-for-minor-pre-major: false, and the fullchangelog-sectionsarray are unchanged..release-please-manifest.json: Repointed from{ ".": "0.1.0" }to{ "packages/cli": "0.1.0" }..github/workflows/release.yml(new): Publishes@council-ai/clito npm on GitHub Releasepublished, using OIDC trusted publishing + provenance — no stored npm token.bootstrap-sha choice
Updated
bootstrap-shafrom the stale pre-monorepo SHA (aad17e6…) to the current post-monorepomainHEAD (a3c1ff6942d7cf8a95daaf2bd4f85b31affcc778). Because we are introducing a newpackages/clicomponent path, release-please treats it as a new package; anchoring at current HEAD ensures the first generated release PR has a clean changelog scoped to new commits rather than replaying the entire pre-monorepo history.Publish workflow details
on: release: types: [published]— release-please creates thecli-v*GitHub Release when its release PR merges, which fires this workflow.permissions: { contents: read, id-token: write }—id-token: writeis required for OIDC trusted publishing.# vX.Y.Zcomments matchingci.yml): checkout → pnpm setup → setup-node 22 withregistry-url→npm install -g npm@latest(npm >= 11.5 required for OIDC; Node 22 ships npm 10.x) →pnpm install --frozen-lockfile→pnpm --filter @council-ai/cli build→ validation gate (publint,attw,npm pack --dry-run) →npm publish --provenance --access publicinpackages/cli.NODE_AUTH_TOKEN/NPM_TOKEN— tokenless by design. A human must configure the Trusted Publisher on npmjs.com before the first successful publish; the workflow is correct and tokenless now.Validation
release-please-config.jsonand.release-please-manifest.jsonparse as valid JSON.release.ymlparses as valid YAML; all actions SHA-pinned with version comments.git diff --statshows exactly the 3 intended files.This is a
ci-type change (TDD-exempt; single commit). No source/tests/package.json touched, no deps changed.