Add multi-registry release CI (crates.io · npm · pub.dev) — ADR-011#1
Merged
Conversation
Implements the release pipeline from ADR-011: a tag-triggered workflow that
publishes the SDK to all three registries from a single semver tag.
Workflow (.github/workflows/release.yml):
verify -> build artefacts (parallel) -> assemble packages -> publish (serial)
- verify: extracts semver from tag, asserts [workspace.package].version AND
every [workspace.dependencies] version requirement equal the tag, runs
cargo test --locked --workspace and cargo fmt --check.
- build-{android,ios,wasm,flutter}: cross-compile native libs + run binding
codegen; android also uploads libel_ffi.so, ios uploads libel_ffi.a.
- assemble-{npm,flutter}: bundle generated bindings WITH native libraries into
the distributable packages; assemble-flutter runs `dart pub publish --dry-run`
as a validation gate.
- publish-crates: gated on BOTH assembly jobs so the immutable crates.io
registry is the last thing validated; publishes 11 crates in dependency
order, polling the crates.io index between tiers instead of fixed sleeps.
- publish-npm needs publish-crates; publish-pub needs publish-npm — strict
crates -> npm -> pub serialization so a mid-pipeline failure cannot leave the
registries diverged.
Cargo manifests:
- Centralize ALL internal crate deps in [workspace.dependencies] with both
path and version, the single source of truth for registry version
requirements. Member crates reference them via `{ workspace = true }` and
carry no inline internal-dep versions, so `cargo set-version --workspace`
updates everything atomically and `cargo publish` can rewrite path deps.
ADR-011 marked accepted.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the release pipeline from ADR-011: a tag-triggered GitHub Actions workflow that publishes the SDK to crates.io, npm, and pub.dev from a single semver tag (
v1.2.3).What's in here
.github/workflows/release.yml(new)[workspace.package].versionand every[workspace.dependencies]version requirement equal the tag; runscargo test --locked --workspace+cargo fmt --check.libel_ffi.so, iOS uploadslibel_ffi.a.assemble-flutterrunsdart pub publish --dry-runas a validation gate.publish-crates; publish-pub needspublish-npm— strictcrates → npm → pubserialization so a mid-pipeline failure can't leave registries diverged.Cargo manifests
[workspace.dependencies]with bothpathandversion— the single source of truth for registry version requirements. Member crates use{ workspace = true }with no inline internal-dep versions, socargo set-version --workspacebumps everything atomically andcargo publishcan rewrite path deps to registry deps.ADR-011 marked
accepted.Required secrets
Configure in Settings → Secrets and variables → Actions before the first release:
CARGO_REGISTRY_TOKENNPM_TOKENPUB_CREDENTIALS~/.config/dart/pub-credentials.jsonHow to cut a release
Verification
cargo check --locked --workspacepasses —Cargo.lockunchanged (only version constraints added; resolved versions identical).publish-cratestransitively gated behind all four build jobs + both assembly jobs.cargo set-versionfix hint.Review trail
Addresses prior review rounds: internal-dep version requirements, serialized publish ordering, npm package name/contents, token scoping, YAML block-scalar fix, index-poll vs. fixed sleeps, native libs bundled into mobile packages, and crates.io gated behind assembly/dry-run validation.
🤖 Generated with Claude Code