ci(release): publish npm packages with provenance and attest release bundles (#1296)

Every published artifact is now cryptographically verifiable as built by
this repo's Release workflow: npm publishes carry npm provenance (OIDC,
shows the Provenance badge on npmjs.com), and the GitHub Release bundles
+ SHA256SUMS get signed build attestations via
actions/attest-build-provenance, verifiable with
`gh attestation verify <file> -R colbymchenry/codegraph`.

pack-npm.sh now writes a repository field into the generated shim and
per-platform package.jsons — npm --provenance refuses to publish without
one matching the repo — and the root package.json gains the same field.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Colby Mchenry
2026-07-15 19:10:34 -05:00
committed by GitHub
co-authored by Claude Fable 5
parent e871c49a31
commit 2b0b4b587e
4 changed files with 33 additions and 4 deletions
+6 -2
View File
@@ -64,7 +64,10 @@ for archive in "${archives[@]}"; do
description: `CodeGraph self-contained bundle for ${process.env.TARGET}`,
os: [process.env.OSV], cpu: [process.env.ARCHV],
files: [process.env.NODEFILE, "lib", "bin"],
license: "MIT"
license: "MIT",
// npm --provenance refuses to publish unless this matches the repo
// the release workflow runs in.
repository: { type: "git", url: "git+https://github.com/colbymchenry/codegraph.git" }
}, null, 2) + "\n");
' "$pkgdir/package.json"
targets+=("$target")
@@ -111,7 +114,8 @@ VERSION="$VERSION" SCOPE="$SCOPE" TARGETS="${targets[*]}" \
},
optionalDependencies: opt,
files: ["npm-shim.js","npm-sdk.js","dist","README.md"],
license: "MIT"
license: "MIT",
repository: { type: "git", url: "git+https://github.com/colbymchenry/codegraph.git" }
}, null, 2) + "\n");
' "$NPM/main/package.json"