Skip to content

Commit 7b149da

Browse files
committed
feat: initial release of Basic Memory MCP Server Extension
Signed-off-by: ossfellow <masoudbahar@gmail.com>
1 parent 848aff2 commit 7b149da

2 files changed

Lines changed: 126 additions & 11 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish to Zed Extensions
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: "Version to release (e.g. v0.0.1)"
7+
required: true
8+
type: string
9+
10+
jobs:
11+
publish:
12+
name: Publish to Zed Extensions
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
# Verify the version matches extension.toml
20+
- name: Verify version
21+
run: |
22+
VERSION=$(grep '^version = ' extension.toml | cut -d'"' -f2)
23+
if [ "v$VERSION" != "${{ inputs.version }}" ]; then
24+
echo "Version mismatch: v$VERSION != ${{ inputs.version }}"
25+
exit 1
26+
fi
27+
28+
# Build WASM
29+
- name: Install Rust
30+
uses: dtolnay/rust-toolchain@stable
31+
with:
32+
targets: wasm32-wasip1
33+
34+
- name: Build
35+
run: cargo build --verbose --target wasm32-wasip1 --release
36+
37+
# Uncomment when ready to publish to Zed extensions
38+
# - uses: huacnlee/zed-extension-action@v1
39+
# with:
40+
# extension-name: mcp-server-basic-memory
41+
# push-to: zed-industries/extensions
42+
# env:
43+
# COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}

.github/workflows/release.yml

Lines changed: 83 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,90 @@
1+
name: Build and Release
2+
13
on:
24
push:
3-
tags:
4-
- "v*"
5+
branches: [main]
6+
tags: ["v*"]
7+
pull_request:
8+
branches: [main]
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
permissions:
14+
contents: write
515

616
jobs:
7-
release:
8-
name: Release Zed Extension
17+
dco-check:
18+
name: DCO Check
19+
if: github.event_name == 'pull_request'
20+
runs-on: ubuntu-24.04
21+
steps:
22+
- uses: tisonkun/actions-dco@v1.1
23+
24+
build:
25+
name: Build and Test
926
runs-on: ubuntu-24.04
27+
outputs:
28+
hashes: ${{ steps.hash.outputs.hashes }}
1029
steps:
11-
- uses: huacnlee/zed-extension-action@v1
30+
- uses: actions/checkout@v4
31+
32+
- name: Install Rust
33+
uses: dtolnay/rust-toolchain@stable
34+
with:
35+
components: clippy, rustfmt
36+
targets: wasm32-wasip1
37+
38+
- name: Cache dependencies
39+
uses: Swatinem/rust-cache@v2
40+
41+
- name: Check formatting
42+
run: cargo fmt --all -- --check
43+
44+
- name: Run clippy
45+
run: cargo clippy --all-targets --all-features -- -D warnings
46+
47+
- name: Build
48+
run: cargo build --verbose --target wasm32-wasip1 --release
49+
50+
# Verify version matches extension.toml
51+
- name: Verify Version
52+
if: startsWith(github.ref, 'refs/tags/')
53+
run: |
54+
VERSION=${GITHUB_REF#refs/tags/}
55+
TOML_VERSION="v$(grep '^version = ' extension.toml | cut -d'"' -f2)"
56+
if [ "$VERSION" != "$TOML_VERSION" ]; then
57+
echo "Version mismatch: $VERSION != $TOML_VERSION"
58+
exit 1
59+
fi
60+
61+
# Generate hash for SLSA provenance
62+
- name: Generate Artifact Hash
63+
if: startsWith(github.ref, 'refs/tags/')
64+
id: hash
65+
run: |
66+
cd target/wasm32-wasip1/release/
67+
echo "hashes=$(sha256sum *.wasm | base64 -w0)" >> "${GITHUB_OUTPUT}"
68+
69+
# Create GitHub release if this is a tag
70+
- name: Create GitHub Release
71+
if: startsWith(github.ref, 'refs/tags/')
72+
uses: softprops/action-gh-release@v1
1273
with:
13-
extension-name: mcp-server-basic-memory
14-
# extension-path: extensions/${{ extension-name }}
15-
push-to: ossfellow/zed-mcp-server-basic-memory
16-
env:
17-
# the personal access token should have "repo" & "workflow" scopes
18-
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
74+
generate_release_notes: true
75+
files: |
76+
target/wasm32-wasip1/release/*.wasm
77+
78+
# Generate SLSA provenance
79+
provenance:
80+
needs: [build]
81+
if: startsWith(github.ref, 'refs/tags/')
82+
permissions:
83+
actions: read # To read the workflow path
84+
id-token: write # To sign the provenance
85+
contents: write # To add assets to a release
86+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
87+
with:
88+
base64-subjects: "${{ needs.build.outputs.hashes }}"
89+
upload-assets: true # Upload to the release
90+
private-repository: true # Allow provenance for private repos

0 commit comments

Comments
 (0)