polytune 0.2.0-alpha.4

Maliciously-Secure Multi-Party Computation (MPC) Engine using Authenticated Garbling
Documentation
on:
  push:
    tags:
      - "v[0-9]*"

name: Publish

concurrency:
  group: "publish"

jobs:
  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
        with:
          toolchain: stable
          components: clippy
      - name: Install taplo for extracting polytune version
        uses: taiki-e/install-action@537c30d2b45cc3aa3fb35e2bbcfb61ef93fd6f02
        with:
          tool: taplo@0.10.0
      - name: Check that crate version matches tag version
        run: |
          polytune_version=$(taplo get -f Cargo.toml 'package.version')
          tag_version=$(echo "${{ github.ref_name }}" | sed 's/v//')
          if [[ "$polytune_version" != "$tag_version" ]]; then
            echo "::error:: Polytune version ${polytune_version} does not match tag version ${tag_version}"
            exit 1
          fi
      - run: cargo test --release
      - run: cargo clippy -- -Dwarnings
      - run: cargo publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}