ubt 0.4.1

Unified Binary Tree implementation based on EIP-7864
Documentation
name: Release

on:
  push:
    tags:
      - 'v*'

permissions:
  contents: write

jobs:
  publish:
    runs-on: ubuntu-latest
    
    steps:
      - name: Checkout repository
        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
        with:
          submodules: recursive

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

      - name: Verify version matches tag
        run: |
          CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
          TAG_VERSION=${GITHUB_REF_NAME#v}
          if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then
            echo "::error::Cargo.toml version ($CARGO_VERSION) does not match tag ($TAG_VERSION)"
            exit 1
          fi
          echo "Version verified: $CARGO_VERSION"

      - name: Run tests
        run: cargo test

      - name: Extract changelog for this version
        id: changelog
        run: |
          VERSION=${GITHUB_REF_NAME#v}
          # Extract the changelog section for this version
          NOTES=$(awk "/^## \[${VERSION}\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md)
          # Handle multi-line output
          echo "notes<<EOF" >> $GITHUB_OUTPUT
          echo "$NOTES" >> $GITHUB_OUTPUT
          echo "EOF" >> $GITHUB_OUTPUT

      - name: Create GitHub Release
        uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2
        with:
          name: ${{ github.ref_name }}
          body: |
            ${{ steps.changelog.outputs.notes }}

            [crates.io](https://crates.io/crates/ubt/${{ github.ref_name }})
          draft: false
          prerelease: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

      - name: Summary
        run: |
          echo "## Release Published" >> $GITHUB_STEP_SUMMARY
          echo "" >> $GITHUB_STEP_SUMMARY
          echo "| Item | Value |" >> $GITHUB_STEP_SUMMARY
          echo "|------|-------|" >> $GITHUB_STEP_SUMMARY
          echo "| Version | ${GITHUB_REF_NAME} |" >> $GITHUB_STEP_SUMMARY
          echo "| GitHub Release | [${GITHUB_REF_NAME}](https://github.com/${{ github.repository }}/releases/tag/${GITHUB_REF_NAME}) |" >> $GITHUB_STEP_SUMMARY
          echo "| Crate | [ubt](https://crates.io/crates/ubt) |" >> $GITHUB_STEP_SUMMARY