Publish xmloxide to crates.io
Publish version $ARGUMENTS of the xmloxide crate. If no version argument is
provided, publish the version currently in Cargo.toml.
Pre-flight checks
Run ALL of the following checks. If any fail, stop and report the issue. Do NOT proceed to publishing if any check fails.
Working tree clean:
git statusmust show no uncommitted changes. If there are changes, stop and ask the user to commit or stash them.Format check:
cargo fmt --all -- --checkLint check:
cargo clippy --all-targets --all-features -- -D warningsFull test suite:
cargo test --all-featuresAll tests must pass (unit, FFI, integration, doc tests).Doc build:
cargo doc --all-features --no-depsMust build with no warnings.Version consistency: If a version argument was provided, verify
Cargo.tomlhas that version. If not, update it and commit the change.Changelog: Verify CHANGELOG.md has an entry for this version.
Dry run:
cargo publish --dry-run --all-featuresMust succeed with no errors (warnings about excluded test files are OK).
Publish
After ALL pre-flight checks pass, show the user a summary:
- Version being published
- Number of tests passed
- Package size from dry run
- Any warnings from dry run
Then ask the user for final confirmation before proceeding.
Once confirmed:
- Tag the release:
git tag -a v<VERSION> -m "Release v<VERSION>" - Publish to crates.io:
cargo publish --all-features - Push the tag:
git push origin v<VERSION> - Create GitHub release: Use
gh release create v<VERSION> --title "v<VERSION>" --notes-file -with the changelog entry for this version as the release notes.
Post-publish verification
- Check that the crate appears on crates.io:
https://crates.io/crates/xmloxide - Report the published version and links to the user.
Error handling
- If
cargo publishfails due to authentication, tell the user to runcargo loginfirst. - If the tag already exists, ask the user whether to overwrite or skip tagging.
- If any pre-flight check fails, report exactly which check failed and why. Do NOT skip checks or proceed with a partial publish.
Source: jonwiggins/xmloxide — distributed by TomeVault.