ci(release): per-package PyPI publish environments (validated on TestPyPI)#53
Conversation
Two packages publish from one repo+workflow, and PyPI forbids two pending publishers sharing (repository, workflow, environment). Split publish-pypi into publish-plugin + publish-loomweave with distinct, index-aware environments: plugin → testpypi-plugin (dry-run) / pypi-plugin (real) loomweave → testpypi (dry-run) / pypi (real) `publish-loomweave needs publish-plugin` keeps plugin-first ordering. Also: the verify "tagged commit is on main" assertion now applies only to tag pushes — a workflow_dispatch dry-run publishes solely to TestPyPI, so it may run from any branch, letting the publish workflow be validated before it merges to main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7825bab6ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # which is `verify`-gated via build-*; dispatch dry-runs hit TestPyPI only. | ||
| publish-plugin: | ||
| name: Publish loomweave-plugin-python (first) | ||
| needs: [build-plugin] |
There was a problem hiding this comment.
Wait for loomweave wheels before publishing plugin
On tag releases where a later wheel build fails or is still waiting (for example the macOS wheel leg in build-wheels), this job can now publish loomweave-plugin-python to PyPI because it only needs build-plugin; the previous combined publish job did not start until both build-wheels and build-plugin completed. That leaves a partial public release with the plugin version uploaded but no matching loomweave package or GitHub release, and the version cannot be cleanly retried on PyPI. Add build-wheels back as a prerequisite for the plugin publish while keeping publish-loomweave dependent on publish-plugin for ordering.
Useful? React with 👍 / 👎.
Splits
publish-pypiinto two env-scoped jobs so the two packages can use distinct trusted-publisher environments (PyPI forbids two pending publishers sharing repo+workflow+environment):publish-plugintestpypi-pluginpypi-pluginpublish-loomweavetestpypipypipublish-loomweave needs publish-pluginpreserves plugin-first ordering. Theverify"on-main" assertion now applies only to tag pushes (aworkflow_dispatchdry-run is TestPyPI-only, so it may run from any branch).Validated on TestPyPI (dry-run run 27031285206, green): both packages published, and
uvx --index-url test.pypi.org --extra-index-url pypi --from loomweave==1.0.0 loomweave doctor→plugin.availability: ok — 1 language plugin discovered: pythonin a scrubbed env.After merge: tag
v1.0.0→ real PyPI publish (plugin first).🤖 Generated with Claude Code