warmplane 0.30.0

Local control plane that keeps MCP sessions warm with compact capability/resource/prompt facades.
Documentation
name: Release Artifacts

on:
  push:
    tags:
      - "*"
  workflow_dispatch:

permissions:
  contents: write

jobs:
  build:
    name: Build ${{ matrix.target }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            use_cross: false
            features: "--features semantic-search"
          - os: ubuntu-latest
            target: aarch64-unknown-linux-gnu
            use_cross: false
            features: "--features semantic-search"
          - os: ubuntu-latest
            target: x86_64-unknown-linux-musl
            use_cross: true
            features: ""
          - os: ubuntu-latest
            target: aarch64-unknown-linux-musl
            use_cross: true
            features: ""
          - os: macos-14
            target: aarch64-apple-darwin
            use_cross: false
            features: "--features semantic-search"
          - os: macos-14
            target: x86_64-apple-darwin
            use_cross: false
            features: "--features semantic-search"

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}

      - name: Setup Bun
        uses: oven-sh/setup-bun@v2
        with:
          bun-version: latest

      - name: Build Web UI
        working-directory: ui
        run: |
          bun install --frozen-lockfile
          bun run build

      - name: Install Linux cross toolchains
        if: matrix.os == 'ubuntu-latest' && !matrix.use_cross
        run: |
          sudo apt-get update
          sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

      - name: Install cross
        if: matrix.use_cross
        uses: taiki-e/install-action@v2
        with:
          tool: cross

      - name: Build with cross
        if: matrix.use_cross
        run: cross build --release --target ${{ matrix.target }} ${{ matrix.features }}

      - name: Build with cargo
        if: ${{ !matrix.use_cross }}
        env:
          CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
        run: cargo build --release --target ${{ matrix.target }} ${{ matrix.features }}

      - name: Set version
        shell: bash
        run: |
          if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
            echo "VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV"
          else
            echo "VERSION=manual-${GITHUB_RUN_NUMBER}" >> "$GITHUB_ENV"
          fi

      - name: Package artifact
        shell: bash
        run: |
          set -euo pipefail
          mkdir -p dist
          name="warmplane-${VERSION}-${{ matrix.target }}"
          stage="dist/${name}"
          mkdir -p "$stage"

          cp "target/${{ matrix.target }}/release/warmplane" "$stage/"
          cp README.md "$stage/"
          cp docs/openapi.yaml "$stage/"
          cp docs/config.schema.json "$stage/"

          tar -C dist -czf "dist/${name}.tar.gz" "$name"

          mcpb_stage="dist/${name}.mcpb-stage"
          mkdir -p "$mcpb_stage/server" "$mcpb_stage/config"
          cp "target/${{ matrix.target }}/release/warmplane" "$mcpb_stage/server/warmplane"
          cp packaging/mcpb/mcp_servers.json "$mcpb_stage/config/mcp_servers.json"
          jq --arg version "${VERSION#v}" '.version = $version' packaging/mcpb/manifest.json > "$mcpb_stage/manifest.json"
          cp README.md "$mcpb_stage/README.md"
          cp docs/INSTALL.md "$mcpb_stage/INSTALL.md"
          chmod +x "$mcpb_stage/server/warmplane"
          (cd "$mcpb_stage" && zip -q -r "../${name}.mcpb" .)
          unzip -t "dist/${name}.mcpb" >/dev/null

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: warmplane-${{ matrix.target }}
          path: |
            dist/*.tar.gz
            dist/*.mcpb
          if-no-files-found: error

  release:
    name: Publish GitHub Release Assets
    runs-on: ubuntu-latest
    needs: build
    if: startsWith(github.ref, 'refs/tags/')

    steps:
      - name: Download artifacts
        uses: actions/download-artifact@v4
        with:
          path: release-dist
          merge-multiple: true

      - name: Generate checksums
        working-directory: release-dist
        run: sha256sum *.tar.gz *.mcpb > checksums.txt

      - name: Generate MCP Registry metadata
        env:
          RELEASE_TAG: ${{ github.ref_name }}
        working-directory: release-dist
        run: |
          python3 - <<'PY'
          import hashlib
          import json
          import os
          from pathlib import Path

          tag = os.environ["RELEASE_TAG"]
          version = tag.removeprefix("v")
          packages = []
          for artifact in sorted(Path(".").glob("*.mcpb")):
              digest = hashlib.sha256(artifact.read_bytes()).hexdigest()
              packages.append({
                  "registryType": "mcpb",
                  "identifier": f"https://github.com/Warmplane/warmplane/releases/download/{tag}/{artifact.name}",
                  "version": version,
                  "fileSha256": digest,
                  "transport": {"type": "stdio"},
              })

          metadata = {
              "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
              "name": "io.github.Warmplane/warmplane",
              "title": "Warmplane",
              "description": "Local MCP control plane for persistent sessions and compact capability discovery.",
              "version": version,
              "repository": {
                  "url": "https://github.com/Warmplane/warmplane",
                  "source": "github",
              },
              "packages": packages,
          }
          Path("server.json").write_text(json.dumps(metadata, indent=2) + "\n")
          PY

      - name: Publish release assets
        uses: softprops/action-gh-release@v2
        with:
          files: |
            release-dist/*.tar.gz
            release-dist/*.mcpb
            release-dist/checksums.txt
            release-dist/server.json