ci: publish codex-profile to npm on tag push#20
Merged
Conversation
Add a GitHub Actions workflow so npm releases stop drifting behind the GitHub tags (npm was stuck on 0.2.0 while the repo and GitHub release were on 0.3.0). - Triggers on `v*` tag pushes and manual workflow_dispatch. - Gates publish on `make test`. - On tag pushes, verifies the tag matches package.json before publishing. - Publishes with npm provenance (id-token: write) and public access. - Requires an `NPM_TOKEN` repository secret (npm automation token). Co-Authored-By: Claude Opus 4.8 <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.
Summary
npm is currently stuck on 0.2.0 while the repo source and the GitHub release are on 0.3.0 — there was no publish automation. This adds a workflow so npm tracks the tags automatically.
.github/workflows/publish.yml:v*tag pushes and manualworkflow_dispatch.make test.package.jsonbefore publishing (prevents mismatched releases).id-token: write) and--access public.Required before it can publish
Add a repository secret
NPM_TOKEN= an npm automation access token for an account with publish rights tocodex-profile(Settings → Secrets and variables → Actions). Automation tokens bypass 2FA prompts, which is required for CI publishing.Publishing 0.3.0
The
v0.3.0tag already existed before this workflow, so it won't auto-fire for 0.3.0. After merging + adding the secret, publish 0.3.0 by either:git push origin :v0.3.0 && git push origin v0.3.0.Future tags (
v0.3.1, …) publish automatically.Test plan
make testpasses locally; the workflow re-runs it as the publish gate.🤖 Generated with Claude Code