ci: add npm publish workflow for @fathom-rules/sdk#51
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Currently we do not have npm publishing set up so actual publishing will not take place yet. Whenever we do, we can merge this. |
se-jo-ma
added a commit
that referenced
this pull request
Jun 24, 2026
fathom-ts/package.json was touched by #51 (repository.url https->git+https), tripping the doc-source drift gate. The repo-url format change doesn't affect this page's content; re-verified. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017pXsj4Q7q1Vn2mtHhakTtJ Signed-off-by: se-jo-ma <mauk.sean@gmail.com>
se-jo-ma
added a commit
that referenced
this pull request
Jun 24, 2026
fathom-ts/package.json was touched by #51 (repository.url https->git+https), tripping the doc-source drift gate. The repo-url format change doesn't affect this page's content; re-verified. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017pXsj4Q7q1Vn2mtHhakTtJ Signed-off-by: se-jo-ma <mauk.sean@gmail.com>
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.
Summary
Adds an npm publish pipeline for the
@fathom-rules/sdkTypeScript SDK, mirroringpypi-publish.yml..github/workflows/npm-publish.yml: triggers onv*.*.*tags (plusworkflow_dispatch),environment: npm,working-directory: packages/fathom-ts.pnpm/action-setup@v6(v9) +actions/setup-node@v6(node 20,registry-url: https://registry.npmjs.org).pnpm install --frozen-lockfile→pnpm run build(tsc, emitsdist/).npm publish --provenance --access publicwithNODE_AUTH_TOKENfromsecrets.NPM_TOKEN.permissions: id-token: writefor npm provenance (the same OIDC attestation mechanism pypi-publish.yml uses).package.jsonmetadata fix:repository.urlcorrected from the barehttps://github.com/KrakenNet/fathomto the canonicalgit+https://github.com/KrakenNet/fathom.git;repository.directorywas alreadypackages/fathom-ts.The package already carries
build(tsc),main,types, andfiles: ["dist"]onmain, so no bundler/build scaffolding was added — only the publish lane and the URL fix.What is NOT in scope (maintainer decisions per issue #40)
nodecomponent) is deliberately left to the maintainer. The workflow publishes whatever version is inpackages/fathom-ts/package.jsonat the tagged commit — no lockstep automation was invented.Action required before this works
NPM_TOKENrepository secret (an npm automation/granular token with publish rights to@fathom-rules), and (recommended) configure thenpmdeployment environment. The first npm provenance build also requires the@fathom-rulesscope to exist with the publishing account as a member.v*.*.*release tag — npm publish cannot be exercised from a PR.Local verification
From
packages/fathom-ts(pnpm 10 / node 22):pnpm install --frozen-lockfile+pnpm run build→ exit 0, emitsdist/.npm pack --dry-run→ clean file list:dist/(.js+.d.ts+.map) +package.jsononly. Nosrc/,test/, ornode_modules/(grep count: 0).@fathom-rules/sdk, version0.1.0, 53 files, package size 22.0 kB, unpacked 112.0 kB.uv run python -c "import yaml; yaml.safe_load(...)"→ workflow YAML parses;jobs: ['publish'],permissions.id-token: write,environment: npm.Security
No third-party binary downloads in the workflow — only
actions/checkout@v6,pnpm/action-setup@v6,actions/setup-node@v6(pinned to major). Nothing to SHA-256 pin. TheNPM_TOKENsecret is passed viaenv:, never interpolated into a shell command.Fixes #40
🤖 Generated with Claude Code