ci: publish on a version tag, with provenance - #1
Merged
Conversation
threadkit has a CI workflow but no way to ship. The package is publish-ready — name unclaimed on npm, `files: ["dist"]`, README and LICENSE both in the tarball, 27 files, builds clean — so the only thing standing between it and a release was a manual `npm publish` from someone's laptop. This is the same workflow ai-forms already carries, so the two libraries release identically rather than each growing its own procedure: - triggered by a `v*` tag, so every published artifact traces to a commit - `id-token: write` for npm provenance — the registry can prove the tarball was built by this workflow from this commit, not uploaded from a laptop - runs `npm run verify` first: never publish something that would not pass CI - refuses to publish when the tag and package.json version disagree, instead of silently shipping the wrong number Verified locally with the workflow's exact steps: `npm ci --ignore-scripts` then `npm run verify` — 31 tests pass. Needs the NPM_TOKEN repo secret once; after that a release is `npm version` plus a tag push. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
threadkit has a CI workflow but no way to ship. The package is publish-ready — name unclaimed on npm,
files: ["dist"], README and LICENSE both in the tarball (27 files), builds clean — so the only thing between it and a release was a manualnpm publishfrom someone's laptop.This is the same workflow ai-forms already carries, so the two libraries release identically instead of each growing its own procedure:
v*tag, so every published artifact traces to a commitid-token: writefor npm provenance — the registry can prove the tarball was built by this workflow from this commit, not uploaded from a laptopnpm run verifyfirst: never publish something that would not have passed CIpackage.jsonversion disagree, instead of silently shipping the wrong numberVerified locally with the workflow's exact steps —
npm ci --ignore-scriptsthennpm run verify— 31 tests pass.Needs the
NPM_TOKENrepo secret once; after that a release isnpm versionplus a tag push.🤖 Generated with Claude Code