From b5eb8d8f8d8e55e9f5476fc80e4881d18ac44782 Mon Sep 17 00:00:00 2001 From: Chirag Jain Date: Mon, 17 Aug 2026 16:18:55 +0530 Subject: [PATCH] Enable npm provenance on publish and add CODEOWNERS. The repo is public, so publish can attest source repo and commit. Path owners split UI packages from the rest of the tree. Co-authored-by: Cursor --- .github/CODEOWNERS | 9 +++++++++ .github/fern/generators.yml | 2 +- .github/workflows/release.yml | 9 ++++++--- RELEASING.md | 4 ++++ packages/trueforge-core/package.json | 2 +- packages/trueforge-sdk/package.json | 2 +- packages/trueforge-ui/package.json | 2 +- packages/trueforge/package.json | 2 +- 8 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..53914f4323 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,9 @@ +# Last matching pattern wins. Enable "Require review from Code Owners" on the +# default branch for these rules to gate merges. +# +# UI packages have their own owners; everyone else falls through to `*`. + +* @debajyoti-truefoundry @chiragjn @heerambavi1998 @sr07asthana @bhaveshpatel640 @thesujai + +/packages/trueforge-ui/ @govindavashishtha @sayan-truefoundry @qaifi-tf @vinit-truefoundry +/packages/frontend/ @govindavashishtha @sayan-truefoundry @qaifi-tf @vinit-truefoundry diff --git a/.github/fern/generators.yml b/.github/fern/generators.yml index b6f286bc1b..f3b90ecc57 100644 --- a/.github/fern/generators.yml +++ b/.github/fern/generators.yml @@ -55,7 +55,7 @@ groups: url: https://github.com/truefoundry/trueforge/issues publishConfig: access: public - provenance: false + provenance: true engines: node: '>=22' allowExtraFields: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 890bd68bbe..c39d18f036 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -169,9 +169,12 @@ jobs: with: pack-dir-artifact-id: ${{ needs.pack.outputs.pack-dir-artifact-id }} create-github-releases: true - # TODO(oss): set NPM_CONFIG_PROVENANCE once the repo is public. Do NOT - # set it now: provenance publicly attests the source repo and commit. - # publishConfig.provenance is false on every public package. + env: + # Attest source repo + commit on every publish. Trusted publishing + # already uses OIDC (`id-token: write`); this flag is what changesets + # / pnpm honor (they do not accept `--provenance`). + # publishConfig.provenance is true on every public package. + NPM_CONFIG_PROVENANCE: "true" - name: Detect @truefoundry/trueforge publish id: trueforge diff --git a/RELEASING.md b/RELEASING.md index f0f013a6f2..bf557cbe55 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -83,6 +83,10 @@ Each public package must list this repo + workflow as a trusted publisher on npm Do not set `NPM_TOKEN` / `_authToken` on the publish job — that disables OIDC. Only the **publish** job has `id-token: write`. +Publish attaches npm provenance (`NPM_CONFIG_PROVENANCE` on the publish job, and +`publishConfig.provenance: true` on every public package). That publicly attests +the source repo and commit on npmjs.com. + ## Local without publishing ```bash diff --git a/packages/trueforge-core/package.json b/packages/trueforge-core/package.json index 87c8e03551..b69306815d 100644 --- a/packages/trueforge-core/package.json +++ b/packages/trueforge-core/package.json @@ -15,7 +15,7 @@ }, "publishConfig": { "access": "public", - "provenance": false + "provenance": true }, "private": false, "type": "module", diff --git a/packages/trueforge-sdk/package.json b/packages/trueforge-sdk/package.json index 4d3f77d424..f3fcad93f4 100644 --- a/packages/trueforge-sdk/package.json +++ b/packages/trueforge-sdk/package.json @@ -273,6 +273,6 @@ }, "publishConfig": { "access": "public", - "provenance": false + "provenance": true } } diff --git a/packages/trueforge-ui/package.json b/packages/trueforge-ui/package.json index 98b972f432..b04b2d05df 100644 --- a/packages/trueforge-ui/package.json +++ b/packages/trueforge-ui/package.json @@ -22,7 +22,7 @@ ], "publishConfig": { "access": "public", - "provenance": false + "provenance": true }, "type": "module", "exports": { diff --git a/packages/trueforge/package.json b/packages/trueforge/package.json index 0fcf0fd9bb..dd10499863 100644 --- a/packages/trueforge/package.json +++ b/packages/trueforge/package.json @@ -15,7 +15,7 @@ }, "publishConfig": { "access": "public", - "provenance": false + "provenance": true }, "private": false, "type": "module",