Skip to content

ci(release): publish @onimurasame/numberone v1.0.0 to npm via OIDC Trusted Publishing pipeline - #15

Merged
onimurasame merged 1 commit into
masterfrom
ci/npm-v1-release-pipeline
Nov 27, 2026
Merged

onimurasame merged 1 commit into
masterfrom
ci/npm-v1-release-pipeline

Conversation

@onimurasame

Copy link
Copy Markdown
Collaborator

Summary

Prepares Number One (v1.0.0) for public npm publication under @onimurasame/numberone and upgrades .github/workflows/release.yml into a hardened, 3-job least-privilege CI/CD release pipeline.

What Changed

  • Scoped npm Package (@onimurasame/numberone):
    • Updated package.json and package-lock.json from unscoped numberone (already taken on npmjs.org at 2.0.0 by another author) to @onimurasame/numberone while preserving both global CLI binaries (n1 and numberone).
    • Set publishConfig: { "access": "public" } in package.json while explicitly passing --provenance in CI so dry-runs, local bootstrap, and on-prem private registry publishes work cleanly outside GitHub OIDC.
  • Hardened 3-Job CI/CD Release Pipeline (.github/workflows/release.yml):
    • Triggers: Automatic on v*.*.* tag pushes + manual workflow_dispatch (defaulting to dry_run: true with npm_tag selection).
    • Job 1 — verify (contents: read, Node 22.22.x, no cache): Validates semver, enforces tag/package version parity and live-publish branch/tag guardrails, runs npm ci, typecheck, build, test, npm audit --audit-level=high, verify:workflows, tarball install smoke tests (both n1 and numberone binaries + ESM NumberOneAgent import), and npm publish --dry-run.
    • Job 2 — publish-npm (contents: read, id-token: write, environment: npm, Node 24): Asserts npm >= 11.5.1 for OIDC Trusted Publishing, builds with npm ci --ignore-scripts, omits registry-url from setup-node to prevent .npmrc placeholder interference, publishes via OIDC Trusted Publishing by default with optional NPM_TOKEN bootstrap fallback (for the initial v1.0.0 publish before the package exists on npmjs.org), enforces --provenance --access public, is idempotent on retries, and verifies live visibility on registry.npmjs.org.
    • Job 3 — github-release (contents: write): Runs after npm publish succeeds, packs the verified tarball + SHA256SUMS.txt, and idempotently creates/updates the GitHub Release with npm install instructions and auto-generated notes.
  • CI, Scripts, Docs & Tests:
    • Updated .github/workflows/ci.yml tarball smoke test to resolve package name dynamically from package.json and verify both n1 and numberone binaries.
    • Updated scripts/rollback.sh default package to @onimurasame/numberone and added npm deployment environment provisioning to scripts/configure-github.sh.
    • Consolidated CHANGELOG.md for v1.0.0, added npm version badge to README.md, and updated package references across README.md, docs/, docs/site/, and examples/.
    • Added deterministic tests in tests/workflow-and-pr-automation.test.ts covering manifest publishability, release.yml hardening, and scripts/rollback.sh --dry-run.

Verification & Bridge Crew Gate

  • npm run typecheck passes with zero errors (src/ + tests/).
  • npm run build succeeds cleanly.
  • npm test passes 100% of unit, integration, adversarial, and E2E suites (10 files, 39 tests).
  • npm audit --audit-level=high reports 0 vulnerabilities.
  • Bridge Crew self-audit (EngineeringOfficer, SecurityOfficer, BridgeOfficer) maintains 100/100 KPI scores without regressions.
  • Every added or updated GitHub Action is pinned to an immutable 40-character commit SHA with explicit minimal permissions: (verify-workflows --verify-remote-tags: 21/21 verified).
  • Documentation (README.md, CHANGELOG.md, docs/INSTALLATION.md, docs/KIDS_AND_SCHOOL_PROJECTS.md, docs/TECHNICAL_GUIDE.md, docs/CODE_REFERENCE.md, docs/ONPREM.md, docs/site/, and examples/) has been updated.

@onimurasame
onimurasame merged commit f748697 into master Nov 27, 2026
5 checks passed
@onimurasame
onimurasame deleted the ci/npm-v1-release-pipeline branch November 27, 2026 17:10
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