CARGO_REGISTRY_TOKENorg secret configured atgithub.com/UOR-Foundation(Settings > Secrets and variables > Actions)
-
Update
versionin the workspace rootCargo.toml:[workspace.package] version = "X.Y.Z"
-
Regenerate the foundation crate and commit:
cargo run --bin uor-crate cargo fmt -- foundation/src/**/*.rs foundation/src/*.rs git add Cargo.toml Cargo.lock foundation/src/ 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
- Verify crate packaging with
cargo publish --dry-run - Create a GitHub Release with ontology artifacts
- Publish
uor-foundationto crates.io
- Validate the tag matches the
The published crate is uor-foundation (generated from foundation/).
The internal ontology crate uor-ontology (in spec/) is not published.
- 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/fails in CI, the committed generated code doesn't match the generator output. Runcargo run --bin uor-crate && cargo fmtlocally and commit. - crates.io publish failure: The GitHub Release will already exist.
Fix the issue, delete and re-create the tag, or manually run
cargo publish -p uor-foundation. - Version already published: crates.io does not allow re-publishing the same version. Bump the version and create a new tag.