Skip to content

Commit fd64c9a

Browse files
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 <noreply@anthropic.com>
1 parent bd16fe3 commit fd64c9a

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
- uses: dtolnay/rust-toolchain@stable
1616
- uses: Swatinem/rust-cache@v2
1717
- run: cargo test --all
18+
- name: Publish to crates.io
19+
run: cargo publish
20+
env:
21+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1822
- uses: docker/setup-qemu-action@v3
1923
- uses: docker/setup-buildx-action@v3
2024
- uses: docker/login-action@v3

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
- 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
12+
- Added `#![doc = include_str!("../README.md")]` to `src/main.rs` so docs.rs renders the README as the crate landing page
13+
- Release workflow now publishes to crates.io automatically on tag push (requires `CARGO_REGISTRY_TOKEN` secret)
14+
1015
### Added
1116
- Custom MiniJinja template filters: `sha256`, `base64_encode`, `base64_decode` available in all templates (render and seed spec files)
1217
- `sha256` filter with optional `mode` parameter (`"hex"` default, `"bytes"` for byte array output)

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
name = "initium"
33
version = "1.0.4"
44
edition = "2021"
5-
description = "Swiss-army toolbox for Kubernetes initContainers"
5+
rust-version = "1.88"
6+
authors = ["Kitstream <opensource@kitstream.io>"]
7+
description = "Swiss-army toolbox for Kubernetes initContainers — wait-for, migrate, seed, render, fetch in a single static Rust binary"
68
license = "Apache-2.0"
79
repository = "https://github.com/KitStream/initium"
810
homepage = "https://github.com/KitStream/initium"
9-
documentation = "https://github.com/KitStream/initium/blob/main/docs/usage.md"
11+
documentation = "https://docs.rs/initium"
1012
keywords = ["kubernetes", "initcontainer", "sidecar", "container", "devops"]
1113
categories = ["command-line-utilities", "development-tools"]
1214
readme = "README.md"
15+
exclude = ["tests/", "examples/", ".github/", "charts/", "docs/", ".claude/"]
1316

1417
[[bin]]
1518
name = "initium"

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![doc = include_str!("../README.md")]
2+
13
mod cmd;
24
mod duration;
35
mod logging;

0 commit comments

Comments
 (0)