majra 1.0.4

Distributed queue & multiplex engine — pub/sub, priority queues, relay, IPC, heartbeat, and rate limiting for Rust
Documentation
name: Release

on:
  push:
    tags: ["*"]

permissions:
  contents: write

jobs:
  ci:
    name: CI Gate
    uses: ./.github/workflows/ci.yml

  publish:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    needs: [ci]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Verify version consistency
        run: |
          FILE_VERSION=$(cat VERSION | tr -d '[:space:]')
          CARGO_VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
          TAG_VERSION="${GITHUB_REF_NAME}"
          if [ "$FILE_VERSION" != "$TAG_VERSION" ]; then
            echo "ERROR: VERSION ($FILE_VERSION) != tag ($TAG_VERSION)"
            exit 1
          fi
          if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then
            echo "ERROR: Cargo.toml ($CARGO_VERSION) != tag ($TAG_VERSION)"
            exit 1
          fi
          echo "Version verified: $TAG_VERSION"
      - name: Publish
        run: cargo publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

  release:
    name: Create GitHub Release
    runs-on: ubuntu-latest
    needs: [ci, publish]
    steps:
      - uses: actions/checkout@v4
      - name: Create GitHub Release
        uses: softprops/action-gh-release@v2
        with:
          generate_release_notes: true