fix(ci): publish SDK internal deps before sdk#806
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d003c729f0
ℹ️ 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 "${name}@${VERSION}" version >/dev/null 2>&1; then | ||
| echo "✓ ${name}@${VERSION} is already published" | ||
| return |
There was a problem hiding this comment.
Skip SDK publish when version is already on npm
The new idempotency check only guards config, github-primitive, and workflow-types; the workflow still always runs npm publish for @agent-relay/sdk. In the exact recovery case this change targets (rerun with the same version after SDK was already published but an internal dep was missing), the internal dep can be repaired but the job still fails at SDK publish because npm rejects republishing an existing name/version. Add the same existence check (or a dist-tag update path) for SDK so reruns can complete successfully.
Useful? React with 👍 / 👎.
Summary
config,github-primitive,workflow-types) duringpackage=sdkreleases before publishing@agent-relay/sdkWhy
@agent-relay/sdk@6.0.4depends on@agent-relay/workflow-types@6.0.4, but that package was not published, so runtime imports of@agent-relay/sdk/workflowsfail withCannot find module @agent-relay/workflow-types. PR #804 fixed thepackage=allpath; this covers thepackage=sdkpath and lets reruns publish a missing internal dep idempotently.Validation
ruby -e "require 'yaml'; YAML.load_file('.github/workflows/publish.yml'); puts 'YAML_OK'"\n-npm --prefix packages/workflow-types run build\n-(cd packages/workflow-types && npm pack --ignore-scripts --pack-destination "$tmp")verified tarball containsdist/index.js,dist/index.d.ts, source maps, andpackage.json