Skip to content

ci: publish codex-profile to npm on tag push#20

Merged
Ducksss merged 1 commit into
mainfrom
claude/npm-publish-workflow
Jun 30, 2026
Merged

ci: publish codex-profile to npm on tag push#20
Ducksss merged 1 commit into
mainfrom
claude/npm-publish-workflow

Conversation

@Ducksss

@Ducksss Ducksss commented Jun 30, 2026

Copy link
Copy Markdown
Owner

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:

  • Triggers on v* tag pushes and manual workflow_dispatch.
  • Gates the publish on make test.
  • On tag pushes, verifies the tag matches package.json before publishing (prevents mismatched releases).
  • Publishes with npm provenance (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 to codex-profile (Settings → Secrets and variables → Actions). Automation tokens bypass 2FA prompts, which is required for CI publishing.

Publishing 0.3.0

The v0.3.0 tag 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:

  • running this workflow via "Run workflow" (workflow_dispatch), or
  • re-pushing the tag: git push origin :v0.3.0 && git push origin v0.3.0.

Future tags (v0.3.1, …) publish automatically.

Test plan

  • make test passes locally; the workflow re-runs it as the publish gate.
  • YAML validated.

🤖 Generated with Claude Code

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>
@Ducksss Ducksss merged commit d9239ed into main Jun 30, 2026
2 checks passed
@Ducksss Ducksss deleted the claude/npm-publish-workflow branch June 30, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant