88 description : ' Version string (e.g. v0.8.0)'
99 type : string
1010 default : ' '
11+ attest :
12+ description : ' Generate build provenance attestations for release artifacts'
13+ type : boolean
14+ default : false
1115
1216permissions :
1317 contents : read
18+ id-token : write
19+ attestations : write
1420
1521jobs :
1622 build-unix :
4551 # release with no Intel macOS binary (a user-reported gap). macos-15-intel
4652 # is GitHub's supported Intel image through Aug 2027 (the last x86_64 macOS
4753 # runner); revisit the Intel leg before that retirement.
48- timeout-minutes : 25
54+ timeout-minutes : 240
4955 steps :
50- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
56+ - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 .0.0
5157
5258 - name : Install deps (Ubuntu)
5359 if : startsWith(matrix.os, 'ubuntu')
8389 tar -czf "codebase-memory-mcp-${GOOS}-${GOARCH}.tar.gz" \
8490 -C build/c codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
8591
92+ - name : Attest standard binary provenance
93+ if : ${{ inputs.attest }}
94+ uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
95+ with :
96+ subject-path : codebase-memory-mcp-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
97+
8698 - name : Build UI binary
8799 env :
88100 VERSION : ${{ inputs.version }}
@@ -113,16 +125,22 @@ jobs:
113125 tar -czf "codebase-memory-mcp-ui-${GOOS}-${GOARCH}.tar.gz" \
114126 -C build/c codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
115127
128+ - name : Attest UI binary provenance
129+ if : ${{ inputs.attest }}
130+ uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
131+ with :
132+ subject-path : codebase-memory-mcp-ui-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
133+
116134 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
117135 with :
118136 name : binaries-${{ matrix.goos }}-${{ matrix.goarch }}
119137 path : " *.tar.gz"
120138
121139 build-windows :
122140 runs-on : windows-latest
123- timeout-minutes : 25
141+ timeout-minutes : 240
124142 steps :
125- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
143+ - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 .0.0
126144
127145 - uses : msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
128146 with :
@@ -158,6 +176,12 @@ jobs:
158176 scripts/gen-third-party-notices.sh THIRD_PARTY_NOTICES.md
159177 zip codebase-memory-mcp-windows-amd64.zip codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
160178
179+ - name : Attest standard binary provenance
180+ if : ${{ inputs.attest }}
181+ uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
182+ with :
183+ subject-path : codebase-memory-mcp-windows-amd64.zip
184+
161185 - name : Build UI binary
162186 shell : msys2 {0}
163187 env :
@@ -178,11 +202,98 @@ jobs:
178202 scripts/gen-third-party-notices.sh THIRD_PARTY_NOTICES.md
179203 zip codebase-memory-mcp-ui-windows-amd64.zip codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
180204
205+ - name : Attest UI binary provenance
206+ if : ${{ inputs.attest }}
207+ uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
208+ with :
209+ subject-path : codebase-memory-mcp-ui-windows-amd64.zip
210+
181211 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
182212 with :
183213 name : binaries-windows-amd64
184214 path : " *.zip"
185215
216+ build-windows-arm64 :
217+ # Native ARM64 Windows binary via the CLANGARM64 toolchain on the
218+ # windows-11-arm runner (the same toolchain the test suite already
219+ # exercises). Without it, ARM-Windows users fall back to the x86_64
220+ # binary under emulation, and npm/pip on native-ARM Node/Python 404.
221+ runs-on : windows-11-arm
222+ timeout-minutes : 240
223+ steps :
224+ - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
225+
226+ - uses : msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
227+ with :
228+ msystem : CLANGARM64
229+ path-type : inherit
230+ install : >-
231+ mingw-w64-clang-aarch64-clang
232+ mingw-w64-clang-aarch64-zlib
233+ make
234+ zip
235+
236+ - uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
237+ with :
238+ node-version : " 22"
239+
240+ - name : Build standard binary
241+ shell : msys2 {0}
242+ env :
243+ VERSION : ${{ inputs.version }}
244+ run : |
245+ if [ -n "$VERSION" ]; then
246+ scripts/build.sh --version "$VERSION" CC=clang CXX=clang++
247+ else
248+ scripts/build.sh CC=clang CXX=clang++
249+ fi
250+
251+ - name : Archive standard binary
252+ shell : msys2 {0}
253+ run : |
254+ BIN=build/c/codebase-memory-mcp
255+ [ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
256+ cp "$BIN" codebase-memory-mcp.exe
257+ scripts/gen-third-party-notices.sh THIRD_PARTY_NOTICES.md
258+ zip codebase-memory-mcp-windows-arm64.zip codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
259+
260+ - name : Attest standard binary provenance
261+ if : ${{ inputs.attest }}
262+ uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
263+ with :
264+ subject-path : codebase-memory-mcp-windows-arm64.zip
265+
266+ - name : Build UI binary
267+ shell : msys2 {0}
268+ env :
269+ VERSION : ${{ inputs.version }}
270+ run : |
271+ if [ -n "$VERSION" ]; then
272+ scripts/build.sh --with-ui --version "$VERSION" CC=clang CXX=clang++
273+ else
274+ scripts/build.sh --with-ui CC=clang CXX=clang++
275+ fi
276+
277+ - name : Archive UI binary
278+ shell : msys2 {0}
279+ run : |
280+ BIN=build/c/codebase-memory-mcp
281+ [ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
282+ cp "$BIN" codebase-memory-mcp.exe
283+ scripts/gen-third-party-notices.sh THIRD_PARTY_NOTICES.md
284+ zip codebase-memory-mcp-ui-windows-arm64.zip codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
285+
286+ - name : Attest UI binary provenance
287+ if : ${{ inputs.attest }}
288+ uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
289+ with :
290+ subject-path : codebase-memory-mcp-ui-windows-arm64.zip
291+
292+ - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
293+ with :
294+ name : binaries-windows-arm64
295+ path : " *.zip"
296+
186297 build-linux-portable :
187298 # Fully static Linux binaries (gcc -static on Ubuntu).
188299 # Runs on any Linux distro without shared library dependencies.
@@ -195,9 +306,9 @@ jobs:
195306 - arch : arm64
196307 runner : ubuntu-24.04-arm
197308 runs-on : ${{ matrix.runner }}
198- timeout-minutes : 25
309+ timeout-minutes : 240
199310 steps :
200- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
311+ - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 .0.0
201312
202313 - name : Install deps
203314 run : sudo apt-get update && sudo apt-get install -y zlib1g-dev
@@ -230,6 +341,12 @@ jobs:
230341 tar -czf "codebase-memory-mcp-linux-${ARCH}-portable.tar.gz" \
231342 -C build/c codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
232343
344+ - name : Attest standard binary provenance
345+ if : ${{ inputs.attest }}
346+ uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
347+ with :
348+ subject-path : codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz
349+
233350 - name : Build UI binary (static)
234351 env :
235352 VERSION : ${{ inputs.version }}
@@ -249,6 +366,12 @@ jobs:
249366 tar -czf "codebase-memory-mcp-ui-linux-${ARCH}-portable.tar.gz" \
250367 -C build/c codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
251368
369+ - name : Attest UI binary provenance
370+ if : ${{ inputs.attest }}
371+ uses : actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
372+ with :
373+ subject-path : codebase-memory-mcp-ui-linux-${{ matrix.arch }}-portable.tar.gz
374+
252375 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
253376 with :
254377 name : binaries-linux-${{ matrix.arch }}-portable
0 commit comments