The msb_krun crates share one release version. Merge the version bump into
krun and confirm the platform CI checks pass before publishing.
Configure the GitHub environment crates-io:
- Restrict deployments to the
krunbranch. - Require a maintainer's approval.
- Add
CARGO_REGISTRY_TOKENas an environment secret. Use a crates.io token with permission to publish allmsb_kruncrates and keep its expiry current.
Do not store the token in repository files or pass it as a workflow input.
- Open Actions → Publish crates → Run workflow.
- Select
krun, enter the merged version (for example,0.1.42), and leave Publish to crates.io off to validate the dependency plan. - Run again with Publish to crates.io enabled and approve the
crates-ioenvironment deployment.
Both jobs use the commit selected when the workflow starts, even if krun
advances while approval is pending. Runs from other branches are skipped.
Only one release workflow runs at a time.
The publisher validates versions and internal dependency requirements before uploading. It includes optional and platform-specific dependencies in the order, waits up to five minutes for each upload to appear in the crates.io index, and stops on upload or registry errors. Rerun the same commit and version after resolving a failure; existing non-yanked versions are skipped. This assumes published versions came from the intended release; crates.io versions cannot be overwritten. A yanked version requires maintainer intervention.
Uploads use cargo publish --no-verify because some crates need platform-specific
build environments. This does not replace the Linux, macOS and Windows PR checks;
confirm those checks before approving publication. The dry run validates the plan
only; it does not prove token permissions or registry package acceptance.
For a local plan check:
python3 scripts/publish-crates.py --version 0.1.42
python3 -m unittest discover -s scripts -p 'test_publish_crates.py'This workflow publishes Rust crates only. It does not create a GitHub release, publish firmware, or update Microsandbox's dependency versions.