feat: initial release of Basic Memory MCP Server Extension #31
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: write | |
| jobs: | |
| dco-check: | |
| name: DCO Check | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: tisonkun/actions-dco@v1.1 | |
| build: | |
| name: Build and Test | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| hashes: ${{ steps.hash.outputs.hashes }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| targets: wasm32-wasip1 | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Build | |
| run: cargo build --verbose --target wasm32-wasip1 --release | |
| # Verify version matches extension.toml | |
| - name: Verify Version | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/} | |
| TOML_VERSION="v$(grep '^version = ' extension.toml | cut -d'"' -f2)" | |
| if [ "$VERSION" != "$TOML_VERSION" ]; then | |
| echo "Version mismatch: $VERSION != $TOML_VERSION" | |
| exit 1 | |
| fi | |
| # Generate hash for SLSA provenance | |
| - name: Generate Artifact Hash | |
| if: startsWith(github.ref, 'refs/tags/') | |
| id: hash | |
| run: | | |
| cd target/wasm32-wasip1/release/ | |
| echo "hashes=$(sha256sum *.wasm | base64 -w0)" >> "${GITHUB_OUTPUT}" | |
| # Create GitHub release if this is a tag | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| target/wasm32-wasip1/release/*.wasm | |
| # Generate SLSA provenance | |
| provenance: | |
| needs: [build] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| actions: read # To read the workflow path | |
| id-token: write # To sign the provenance | |
| contents: write # To add assets to a release | |
| uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0 | |
| with: | |
| base64-subjects: "${{ needs.build.outputs.hashes }}" | |
| upload-assets: true # Upload to the release | |
| private-repository: true # Allow provenance for private repos |