Repository navigation
Harden npm release publishing - #1
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR hardens @pegma/spine’s npm release process by enforcing a signed, immutable release tag flow and splitting “prepare” (build/pack/verify) from the minimal OIDC-enabled “publish” job so only a pre-verified artifact can be released.
Changes:
- Adds a Node-based release validator/packager/publisher script and corresponding tests to verify release metadata, tag authenticity, and retry-safe publishing behavior.
- Updates the publish workflow to (1) verify signed annotated tags and produce a single checked tarball artifact, then (2) publish only that artifact under OIDC in a separate environment-scoped job.
- Extends test discovery/tsconfig to include
tests/**/*.test.ts, and documents the release runbook and required external configuration.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
vitest.config.ts |
Expands vitest includes to run top-level release/workflow tests. |
tsconfig.test.json |
Ensures TypeScript checking includes the new tests/ suite. |
tests/release-packages.test.ts |
Adds coverage for tag validation, workflow hardening invariants, and retry-safe publish decisions. |
scripts/release-packages.mjs |
Implements release metadata validation, deterministic pack+hash+smoke-test, and publish-from-prepared-artifact. |
scripts/release-packages.d.mts |
Provides TS typings for the release script module. |
README.md |
Links maintainers to the release runbook and documents trusted publishing expectations. |
package.json |
Pins npm version via packageManager and adds release:* scripts. |
package-lock.json |
Synchronizes the workspace entry version with the public package version. |
docs/RELEASING.md |
Introduces a detailed release runbook and required external configuration steps. |
AGENTS.md |
Updates repository workflow guidance to match the hardened tag-based release process. |
.gitignore |
Ignores .release/ artifacts produced by release preparation. |
.github/workflows/publish.yml |
Splits prepare vs publish, pins Node, removes dispatch path, and publishes only a verified artifact with OIDC. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What changed
origin/mainworkflow_dispatchpath and document external trusted-publisher, environment, signer, and tag-rule configurationThe lockfile workspace version is also corrected from 0.0.0 to the published manifest version 0.1.1; the new validator caught that existing drift.
Validation
Passed on Node 22.18.0 and 24.18.0 with npm 11.18.0:
npm run format:checknpm run checknpm test(22 tests)npm run release:checkAlso prepared and clean-consumer smoke-tested the exact tarball on Node 24.18.0.