Files
Claude 6424394ad4 Only publish to the registry from main
The push trigger was already restricted to main, but workflow_dispatch
accepts any ref, so a manual dispatch could publish from a feature
branch. That ships code that is not on main and burns the version
number, which then makes the push-triggered run on main fail with
"The node version already exists" - exactly what happened when v1.5.0
was merged.

Add a guard step that fails when the ref is not main. It fails loudly
rather than skipping the job, so a mis-targeted dispatch can never be
mistaken for a successful publish. The manual trigger is kept, since
re-running a publish that failed for a transient reason is still useful.

Also drop master from the push branches, since the default branch is
main and a push there would now be rejected by the guard anyway, and add
a concurrency group so two publishes cannot race for the same version.

This touches no node code, and pyproject.toml is unchanged, so merging
it does not trigger a publish.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbDZTWCvSqbXEX3GHJkSXw
2026-07-28 03:59:35 +00:00
..