jsonx 0.1.0

A serde-enabled implementation of the JSONX extended-JSON format: typed value constructors, unquoted keys, and trailing commas.
Documentation
name: Release
on:
  push:
    tags:
      - "v*"
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - name: Check versions match tag
        run: |
          TAG_VERSION=${GITHUB_REF#refs/tags/v}
          CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | cut -d '"' -f2)
          if [ "$TAG_VERSION" != "$CARGO_VERSION" ]; then
            echo "Tag version $TAG_VERSION does not match jsonx Cargo.toml version $CARGO_VERSION"
            exit 1
          fi
          DERIVE_VERSION=$(grep '^version' jsonx-derive/Cargo.toml | head -1 | cut -d '"' -f2)
          if [ "$TAG_VERSION" != "$DERIVE_VERSION" ]; then
            echo "Tag version $TAG_VERSION does not match jsonx-derive Cargo.toml version $DERIVE_VERSION"
            exit 1
          fi

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Build
        run: cargo build --release --all-features

      # jsonx depends on `jsonx-derive =0.1.0`, so the derive crate must be on
      # crates.io before jsonx can be published. cargo waits for the new
      # version to appear in the index before this step returns.
      - name: Publish jsonx-derive to crates.io
        run: cargo publish
        working-directory: jsonx-derive
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

      - name: Publish jsonx to crates.io
        run: cargo publish --locked
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}