Publish TypeScript bindings to npm#429
Open
jupblb wants to merge 3 commits into
Open
Conversation
a60f6b3 to
e68f3f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires up TypeScript binding publication to npm. Adds a
publish-npmjob torelease.yaml(alongside the existing Rust/JVM/Go publish jobs) and preparesbindings/typescriptfor npm with proper entry points, an emitteddist/build, and OIDC-backed provenance attestation.Post-merge: claim the
@scip-codescope on npmnpm versions are immutable — once
0.7.1is published it can never be re-uploaded. The first publish therefore goes throughnpm publish --dry-runso we can preview the tarball contents before committing.From a maintainer's machine on
main:cd bindings/typescript nix develop -c npm ci nix develop -c npm run build cp ../../LICENSE LICENSE nix develop -c npm publish --dry-run --access publicReview the printed tarball manifest — verify it contains
dist/scip_pb.js,dist/scip_pb.d.ts,package.json, andLICENSE, and nothing else (nonode_modules, noscip_pb.ts, no sourcemaps in excess).When satisfied, claim the scope and publish:
This claims the
@scip-codescope for the npm account and seeds it with@scip-code/scip@0.7.1. From the next release onwards the workflow handles publication automatically once the following repo secret is configured:NPM_TOKEN— a granular access token scoped to the@scip-codepackages withRead and writepermission. The workflow'sid-token: writepermission lets npm verify provenance against this workflow's identity, so unauthorized re-publishes from forks or other workflows are rejected.