iicp-client 0.7.92

Use the open IICP AI mesh from Rust without running a node
Documentation
name: Publish release

# Manual-only while the guarded local publisher remains authoritative.
# Enabling release:published before the CI lane is validated would create
# two competing publishers for the same immutable version.
on:
  workflow_dispatch:
    inputs:
      version:
        description: Existing release version without the v prefix
        required: true
        type: string

concurrency:
  group: rust-release-${{ github.event.release.tag_name || inputs.version }}
  cancel-in-progress: false

permissions:
  contents: read

jobs:
  publish:
    runs-on: ubuntu-latest
    environment: crates-io
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ inputs.version && format('v{0}', inputs.version) || github.event.release.tag_name }}
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@1.86.0
        with:
          components: rustfmt, clippy
      - name: Verify, test and package
        shell: bash
        run: |
          set -euo pipefail
          expected="${{ inputs.version || github.event.release.tag_name }}"
          expected="${expected#v}"
          actual=$(awk -F'"' '/^version = / { print $2; exit }' Cargo.toml)
          test "$actual" = "$expected"
          cargo fmt --check
          cargo clippy --all-targets --all-features -- -D warnings
          cargo test --all-targets
          cargo package
      - name: Clean-install smoke
        run: |
          cargo install --path . --features nat --root /tmp/iicp-release-smoke
          /tmp/iicp-release-smoke/bin/iicp-node --version
      - name: Publish to crates.io
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
        run: cargo publish