depthpack 0.1.0

Compact lossless / bounded-error codec for 16-bit depth maps with nodata (MED prediction + zstd). Pure Rust, wasm-compatible.
Documentation
name: Publish to crates.io
on:
  release:
    types: [published]

jobs:
  publish:
    name: Publish
    runs-on: ubuntu-latest

    permissions:
      contents: read
      id-token: write

    steps:
      - name: Checkout the code
        uses: actions/checkout@v6

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

      - name: Rust cache
        uses: Swatinem/rust-cache@v2

      - name: Set version from tag
        run: |
          VERSION="${GITHUB_REF_NAME#v}"
          sed -i "s/^version = .*/version = \"${VERSION}\"/" Cargo.toml

      # First publish only: the crate does not yet exist on crates.io, so
      # trusted publishing cannot be configured. Use the bootstrap token.
      # After the crate is live, configure Trusted Publishing on crates.io
      # and replace this step with the OIDC auth action (see publish.yaml
      # in jsonfg / copc):
      #
      #   - name: Authenticate via Trusted Publishing (OIDC)
      #     uses: rust-lang/crates-io-auth-action@v1
      #     id: auth
      #   env for publish: CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
      - name: Publish depthpack
        run: cargo publish --allow-dirty
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN_FOR_NEW_CRATES_ONLY }}