From bc2142f9b5ba48cd07e2ab26e0403d1883865c6f Mon Sep 17 00:00:00 2001 From: mikkeldamsgaard Date: Thu, 26 Feb 2026 19:55:31 +0100 Subject: [PATCH] chore: improve crates.io metadata and add cargo publish to release workflow - Enrich description with subcommand keywords for search discoverability - Add rust-version (MSRV 1.88), authors, and docs.rs documentation link - Exclude tests/examples/CI/charts/docs from published crate to reduce size - Add #![doc = include_str!("../README.md")] for docs.rs landing page - Add cargo publish step to release workflow (requires CARGO_REGISTRY_TOKEN secret) Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 4 ++++ CHANGELOG.md | 5 +++++ Cargo.toml | 7 +++++-- src/main.rs | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49c0c89..7c8631c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,10 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - run: cargo test --all + - name: Publish to crates.io + run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f63292..530037e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- Improved crates.io metadata: keyword-rich description, `rust-version = "1.88"` MSRV, authors, `documentation` pointing to docs.rs, and `exclude` to reduce published crate size +- Added `#![doc = include_str!("../README.md")]` to `src/main.rs` so docs.rs renders the README as the crate landing page +- Release workflow now publishes to crates.io automatically on tag push (requires `CARGO_REGISTRY_TOKEN` secret) + ### Added - Custom MiniJinja template filters: `sha256`, `base64_encode`, `base64_decode` available in all templates (render and seed spec files) - `sha256` filter with optional `mode` parameter (`"hex"` default, `"bytes"` for byte array output) diff --git a/Cargo.toml b/Cargo.toml index c601ffc..e4ba590 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,14 +2,17 @@ name = "initium" version = "1.0.4" edition = "2021" -description = "Swiss-army toolbox for Kubernetes initContainers" +rust-version = "1.88" +authors = ["Kitstream "] +description = "Swiss-army toolbox for Kubernetes initContainers — wait-for, migrate, seed, render, fetch in a single static Rust binary" license = "Apache-2.0" repository = "https://github.com/KitStream/initium" homepage = "https://github.com/KitStream/initium" -documentation = "https://github.com/KitStream/initium/blob/main/docs/usage.md" +documentation = "https://docs.rs/initium" keywords = ["kubernetes", "initcontainer", "sidecar", "container", "devops"] categories = ["command-line-utilities", "development-tools"] readme = "README.md" +exclude = ["tests/", "examples/", ".github/", "charts/", "docs/", ".claude/"] [[bin]] name = "initium" diff --git a/src/main.rs b/src/main.rs index 129cdee..f1872a0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +#![doc = include_str!("../README.md")] + mod cmd; mod duration; mod logging;