Fix main publish runtime dependency ordering#808
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c2ca17dd0
ℹ️ 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".
| if npm view "agent-relay@${PKG_VERSION}" version >/dev/null 2>&1; then | ||
| echo "agent-relay@${PKG_VERSION} already exists on npm; skipping publish" | ||
| exit 0 |
There was a problem hiding this comment.
Gate release job when root package publish is skipped
This new early-exit makes publish-main succeed whenever agent-relay@<version> already exists, but create-release still runs because it only checks needs.publish-main.result == 'success'. In a rerun or repair invocation that reuses an already released custom_version, this path reaches the later tag creation/push steps and fails on the existing tag, so the workflow is no longer idempotent for the exact scenario this change is trying to support.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in e578da0. publish-main now exposes a published output from the root publish step: already-existing agent-relay@<version> sets published=false, successful npm publish sets published=true, and create-release now requires needs.publish-main.outputs.published == 'true'. Repair reruns can publish missing deps and skip the existing root package without trying to recreate the tag/release.
Summary
Verification