CARGO_REGISTRY_TOKENorg secret configured atgithub.com/UOR-Foundation(Settings > Secrets and variables > Actions). The token must have permission to publishuor-foundation.
-
Update
versionin the workspace rootCargo.toml:[workspace.package] version = "X.Y.Z"
-
Regenerate the foundation crate and Lean 4 formalization, then commit:
cargo run --bin uor-crate cargo fmt --all cargo run --bin uor-lean git add Cargo.toml Cargo.lock \ foundation/Cargo.toml foundation/src/ \ uor-foundation-sdk/Cargo.toml uor-foundation-sdk/src/ \ lean4/ git commit -m "Bump version to X.Y.Z" -
Tag and push:
git tag vX.Y.Z git push origin main --tags
-
The release workflow will automatically:
- Validate the tag matches the
uor-foundationCargo.toml version - Run all checks (fmt, clippy, test, conformance)
- Regenerate the foundation crate and verify no drift
- Regenerate the Lean 4 formalization and verify no drift
- Build the Lean 4 package with
lake build - Verify
uor-foundationpackaging withcargo publish --dry-run - Create a GitHub Release with ontology artifacts
- Upload Lean 4 cloud release build via
lake upload - Publish
uor-foundationto crates.io
- Validate the tag matches the
Two crates are published to crates.io in this release cycle:
uor-foundation— typed Rust traits for the ontologyuor-foundation-sdk— proc-macro ergonomics (product_shape!,coproduct_shape!,cartesian_product_shape!) for composing partition-algebra shapes from otherConstrainedTypeShapeoperands.
The SDK crate publishes after the foundation crate with a
wait-for-index step between them (see release.yml). This avoids the
classic crates.io ordering failure where the SDK's packaged manifest
depends on uor-foundation = { version = "X.Y.Z" } and the registry
rejects the SDK publish because the new foundation version is not yet
visible.
The internal crates (uor-ontology, uor-codegen, uor-lean-codegen,
uor-conformance, uor-docs, uor-website, uor-clients) are not
published.
The uor Lean 4 package is published via the Lean Reservoir
(reservoir.lean-lang.org). Reservoir automatically indexes this repo
because it has a root lakefile.lean and lake-manifest.json.
On release, lake upload attaches pre-built artifacts to the GitHub
Release so downstream users can skip building from source.
- Tag/version mismatch: The workflow fails early if the tag version
does not match
Cargo.toml. Fix the version and re-tag. - Generated code drift: If
git diff --exit-code foundation/src/ uor-foundation-sdk/src/fails in CI, the committed generated code doesn't match the generator output. Runcargo run --bin uor-crate && cargo fmt --alllocally and commit. - Version already published: crates.io does not allow re-publishing the same version. Bump the version and create a new tag.
- Lean 4 drift: If
git diff --exit-code lean4/fails in CI, the committed Lean code doesn't match the generator output. Runcargo run --bin uor-leanlocally and commit.