Skip to content

Commit c910c58

Browse files
authored
ci: re-enable npm provenance now that the repo is public (#35)
Closes #4. One line: `npm publish --access public` → `npm publish --access public --provenance`. The flag was removed while the repo was internal, since npm provenance requires a public repository. That's no longer true, so published packages can carry [sigstore provenance attestations](https://docs.npmjs.com/generating-provenance-statements) again — npmjs.com shows a "Built and signed on GitHub Actions" badge linking back to the workflow run that produced the tarball. ## Prerequisites, verified against the workflow - `id-token: write` is already granted at workflow level (alongside `contents: write`) — provenance needs it to mint the OIDC token. - The job already runs `npm install -g npm@latest` before publishing, so the npm version is new enough to support the flag. - `actions/setup-node` already sets `registry-url`. Nothing else changes. `NODE_AUTH_TOKEN` and the tag-vs-`package.json` version check are untouched. ## Note on verification This can only be confirmed by cutting a release — there's no way to exercise `npm publish` from CI without publishing. The next tagged release will either produce a package with provenance or fail loudly at the publish step, which is the same blast radius the publish step already has. Complementary to #21: sigstore provenance proves who built the npm package; Kosli attestations record what the artifact is and what evidence backs it.
1 parent b9cc543 commit c910c58

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ jobs:
4848
run: npm test
4949

5050
- name: Publish to npm
51-
run: npm publish --access public
51+
# Auth is npm Trusted Publishing (OIDC) — that is what id-token: write above
52+
# is for, not provenance. Dropping it breaks publishing entirely.
53+
# Trusted publishing already generates provenance on a public repo; passing
54+
# --provenance makes it fail loudly rather than silently skip if that changes.
55+
run: npm publish --access public --provenance
5256

5357
- name: Pack .mcpb bundle
5458
run: npm run pack:mcpb

0 commit comments

Comments
 (0)