name: Release on: push: tags: - 'v*' env: CARGO_TERM_COLOR: always jobs: build: strategy: matrix: include: - target: x86_64-apple-darwin os: macos-latest - target: aarch64-apple-darwin os: macos-latest - target: x86_64-unknown-linux-gnu os: ubuntu-latest - target: aarch64-unknown-linux-gnu os: ubuntu-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} - name: Install cross-compilation tools if: matrix.target == 'aarch64-unknown-linux-gnu' run: | sudo apt-get update sudo apt-get install -y gcc-aarch64-linux-gnu - name: Build MCP Server run: | cargo build --release --package engram-mcp --target ${{ matrix.target }} - name: Package run: | mkdir -p dist cp target/${{ matrix.target }}/release/engram-mcp dist/ cd dist && tar czf engram-mcp-${{ matrix.target }}.tar.gz engram-mcp - name: Upload artifact uses: actions/upload-artifact@v4 with: name: engram-mcp-${{ matrix.target }} path: dist/engram-mcp-${{ matrix.target }}.tar.gz release: needs: build runs-on: ubuntu-latest steps: - name: Download all artifacts uses: actions/download-artifact@v4 with: path: artifacts - name: Create Release uses: softprops/action-gh-release@v1 with: files: artifacts/**/*.tar.gz generate_release_notes: true