fix(release): make Codra CLI workflow resilient to scarce macOS runners#28
Conversation
Abdulmuiz44
commented
Jun 2, 2026
- Makes darwin-x64 optional for release dry runs.
- Adds timeout protection for platform build jobs.
- Allows partial binary packaging for publish=false verification.
- Keeps npm publishing guarded and disabled by default.
- Preserves full binary safety for real publishing.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff292eab04
ℹ️ 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".
| env: | ||
| CODRA_USE_ARTIFACTS: '1' | ||
| CODRA_ARTIFACTS_DIR: ${{ github.workspace }}/packages/codra-npm-cli/artifacts | ||
| CODRA_ALLOW_PARTIAL_BINARIES: ${{ needs.resolve-matrix.outputs.allow_partial }} |
There was a problem hiding this comment.
Align publish packaging with the selected matrix
When publish=true and the default include_darwin_x64=false is used, this passes CODRA_ALLOW_PARTIAL_BINARIES=0 into build-platform-binaries.js, whose TARGETS array still includes codra-darwin-x64; because that artifact was never built/downloaded, the package job exits before validation/publish. This contradicts the new selected-matrix policy and makes the default guarded publish path unusable unless maintainers either include the scarce Intel macOS runner or explicitly allow a partial publish.
Useful? React with 👍 / 👎.
| @@ -67,7 +109,7 @@ jobs: | |||
|
|
|||
| package-npm: | |||
| name: Package @codra/cli npm tarball | |||
There was a problem hiding this comment.
Let dry-run packaging execute after failed shards
Under GitHub Actions needs semantics, if any selected build-binaries matrix job times out or fails, package-npm is skipped unless the job has an if condition such as always(). That means the new dry-run partial-binary mode never gets a chance to package the artifacts from successful shards, so a scarce runner timeout still aborts verification instead of producing the intended partial tarball.
Useful? React with 👍 / 👎.
| working-directory: packages/codra-npm-cli | ||
| env: | ||
| CODRA_EXPECT_ALL_PLATFORMS: '1' | ||
| CODRA_EXPECT_PLATFORMS: ${{ needs.resolve-matrix.outputs.expect_all_pack == '1' && needs.resolve-matrix.outputs.expected_platforms || '' }} |
There was a problem hiding this comment.
Preserve partial mode during pack validation
In the default dry-run path (publish=false, include_darwin_x64=false), the earlier artifact packaging step succeeds with CODRA_ALLOW_PARTIAL_BINARIES=1, but npm test later removes bin/native and rebuilds only the host binary; this validation step then runs npm pack --dry-run, whose prepack sees the downloaded artifacts directory and invokes build-platform-binaries.js without the partial flag. Since codra-darwin-x64 was intentionally not built, validation fails before the tarball can be checked, so the new default dry run is still blocked by the optional Intel macOS artifact.
Useful? React with 👍 / 👎.