ci: token-less npm publishing via OIDC Trusted Publishing#109
Merged
Conversation
Adds a repository_dispatch + workflow_dispatch publish workflow modeled on the AtomicMemory pipeline. It checks out an explicit public_sha, verifies package.json matches the requested version, refuses to republish an existing version, builds/tests, then publishes with id-token write and no NPM_TOKEN, and verifies the registry gitHead matches the released SHA. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What
Adds
.github/workflows/publish.yml— token-less npm publishing forllm-wiki-compilervia OIDC Trusted Publishing, modeled on the AtomicMemory publish pipeline. NoNPM_TOKEN.How it works
repository_dispatch(typellmwiki-package-release) is the primary trigger;workflow_dispatchis a manual fallback. Both take an explicitpublic_sha+version+publishpayload.public_sha(never branch HEAD), verifiespackage.jsonmatchesversion, refuses to republish an existing version, runsrelease:check-docs:current+ build + test +npm pack --dry-run, thennpm publish --access publicwithid-token: write(provenance attached automatically). A final job assertsnpm view … gitHead === public_sha.One-time setup before first use (account-level, not in this repo)
llm-wiki-compiler: repoatomicstrata/llm-wiki-compiler, workflowpublish.yml, environmentnpm-release.npm-releaseGitHub Environment is created on first reference; leave it without required reviewers (auto-publish, per design).Triggering a release (after setup)
This same mechanism can publish the already-tagged 0.11.0 (
public_sha=7107fd7…,version=0.11.0) once the Trusted Publisher is configured.