Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/release-plz-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,39 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Sync README versions and features table
if: ${{ steps.release_step.outputs.releases_created == 'true' }}
env:
RELEASES_JSON: ${{ steps.release_step.outputs.releases }}
PUSH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
set -euo pipefail

if [[ -z "${RELEASES_JSON:-}" || "$RELEASES_JSON" == "[]" ]]; then
echo "Release output is empty; skipping README sync."
exit 0
fi

MULTIIO_VERSION="$(echo "$RELEASES_JSON" | jq -r '.[] | select(.package_name == "multiio") | .version' | head -n1)"

if [[ -z "${MULTIIO_VERSION:-}" || "$MULTIIO_VERSION" == "null" ]]; then
echo "multiio is not part of this release; skipping README sync."
exit 0
fi

python3 scripts/sync_readme.py --version "$MULTIIO_VERSION"

if git diff --quiet -- README*.md; then
echo "README files already up to date."
exit 0
fi

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git checkout -B "${GITHUB_REF_NAME}"

git add README*.md
git commit -m "chore: sync README to v${MULTIIO_VERSION}"
git push origin "HEAD:${GITHUB_REF_NAME}"
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ path = "examples/custom_format.rs"
required-features = ["custom"]

[package.metadata.release]
pre-release-hook = ["bash", "scripts/update_readme_release_metrics.sh"]
pre-release-replacements = [
# Update inline-table dependency snippets like:
# multiio = { version = "0.2", features = ["custom"] }
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Add to your `Cargo.toml`:

```toml
[dependencies]
multiio = { version = "0.2.1", features = ["json"] }
multiio = { version = "0.2.2", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
```

Expand Down Expand Up @@ -73,7 +73,7 @@ Enable the `async` feature (and the formats you use):

```toml
[dependencies]
multiio = { version = "0.2.1", features = ["async", "json", "yaml"] }
multiio = { version = "0.2.2", features = ["async", "json", "yaml"] }
```

```rust
Expand Down Expand Up @@ -110,19 +110,20 @@ trees small.

MSRV: Rust 1.86 (see `rust-version` in `Cargo.toml`).

| Feature | Description | Default | Notes |
| ----------- | --------------------------- | ------- | -------------- |
| `plaintext` | Plaintext format support | ✓ | |
| `json` | JSON format support | | |
| `yaml` | YAML format support | | |
| `toml` | TOML format support | | |
| `ini` | INI/".ini" config support | | |
| `xml` | XML format support | | |
| `csv` | CSV format support | | Enables `json` |
| `custom` | Custom formats via registry | | Enables `json` |
| `async` | Async I/O with Tokio | | |
| `miette` | Pretty error reporting | | |
| `full` | All features | | |
| Feature | Description | Default | Notes |
| ----------- | --------------------------- | ------- | ---------------- |
| `plaintext` | Plaintext format support | ✓ | |
| `json` | JSON format support | | |
| `yaml` | YAML format support | | |
| `toml` | TOML format support | | |
| `ini` | INI/".ini" config support | | |
| `xml` | XML format support | | |
| `csv` | CSV format support | | Enables `json` |
| `custom` | Custom formats via registry | | Enables `json` |
| `async` | Async I/O with Tokio | | |
| `miette` | Pretty error reporting | | |
| `sarge` | Sarge-based CLI helpers | | |
| `full` | All core features | | Excludes `sarge` |

Note: Markdown is intentionally not a first-class format. If you need to ingest
Markdown, use `plaintext` to read the content and then process it as needed.
Expand All @@ -133,7 +134,7 @@ Custom formats are available behind the `custom` feature:

```toml
[dependencies]
multiio = { version = "0.2.1", features = ["custom"] }
multiio = { version = "0.2.2", features = ["custom"] }
```

multiio allows you to register your own formats using `CustomFormat` and
Expand Down
Loading