@@ -166,10 +166,10 @@ jobs:
166166 include :
167167 - arch : arm64
168168 runner : macos-14
169- dist_command : pnpm dist :mac:arm64
169+ dist_command : pnpm pack :mac:arm64
170170 - arch : x64
171171 runner : macos-15-intel
172- dist_command : pnpm dist :mac:x64
172+ dist_command : pnpm pack :mac:x64
173173 runs-on : ${{ matrix.runner }}
174174
175175 steps :
@@ -206,32 +206,18 @@ jobs:
206206 VERSION="${GITHUB_REF#refs/tags/v}"
207207 pnpm pkg set version="$VERSION"
208208
209- - name : Resolve runtime asset name (macOS ${{ matrix.arch }})
210- if : startsWith(github.ref, 'refs/tags/v')
211- id : runtime-asset
212- shell : bash
213- run : |
214- set -euo pipefail
215- if [[ "${{ matrix.arch }}" == "arm64" ]]; then
216- platform="darwin-arm64"
217- else
218- platform="darwin-x64"
219- fi
220- echo "asset_name=$(node ./scripts/runtime-lock.mjs asset-name "$platform")" >> "$GITHUB_OUTPUT"
221-
222209 - name : Stage bundled runtime (macOS ${{ matrix.arch }})
223- if : startsWith(github.ref, 'refs/tags/v')
224210 env :
225211 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
226212 shell : bash
227213 run : |
228214 set -euo pipefail
229- TAG= "${GITHUB_REF# refs/tags/}"
230- rm -rf .runtime-download resources/runtime
231- mkdir -p . runtime-download resources/runtime
232- gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --pattern "${{ steps.runtime-asset.outputs.asset_name }}" --dir .runtime-download
233- tar -xzf ". runtime-download/ ${{ steps.runtime-asset.outputs.asset_name }}" -C .runtime-download
234- cp -R .runtime-download/runtime/. resources/runtime/
215+ if [[ "${GITHUB_REF:-}" == refs/tags/v* ]]; then
216+ TAG="${GITHUB_REF#refs/tags/}"
217+ node ./scripts/stage- runtime.mjs --platform "darwin-${{ matrix.arch }}" --release-tag "$TAG"
218+ else
219+ node ./scripts/stage- runtime.mjs --platform "darwin- ${{ matrix.arch }}"
220+ fi
235221
236222 - name : Build app (macOS ${{ matrix.arch }})
237223 env :
@@ -248,9 +234,7 @@ jobs:
248234 test -f dist-electron/preload/index.js
249235 test -f out/renderer/index.html
250236 test -f mcp-server/dist/index.js
251- if [[ "${GITHUB_REF:-}" == refs/tags/v* ]]; then
252- test -f resources/runtime/VERSION
253- fi
237+ test -f resources/runtime/VERSION
254238
255239 - name : Package (macOS ${{ matrix.arch }})
256240 env :
@@ -321,28 +305,18 @@ jobs:
321305 VERSION="${GITHUB_REF#refs/tags/v}"
322306 pnpm pkg set version="$VERSION"
323307
324- - name : Resolve runtime asset name (Windows)
325- if : startsWith(github.ref, 'refs/tags/v')
326- id : runtime-asset
327- shell : bash
328- run : |
329- echo "asset_name=$(node ./scripts/runtime-lock.mjs asset-name win32-x64)" >> "$GITHUB_OUTPUT"
330-
331308 - name : Stage bundled runtime (Windows)
332- if : startsWith(github.ref, 'refs/tags/v')
333309 shell : pwsh
334310 env :
335311 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
336312 run : |
337313 $ErrorActionPreference = "Stop"
338- $tag = $env:GITHUB_REF.Replace('refs/tags/', '')
339- Remove-Item .runtime-download -Recurse -Force -ErrorAction SilentlyContinue
340- Remove-Item resources/runtime/* -Recurse -Force -ErrorAction SilentlyContinue
341- New-Item -ItemType Directory -Force -Path .runtime-download | Out-Null
342- New-Item -ItemType Directory -Force -Path resources/runtime | Out-Null
343- gh release download $tag --repo $env:GITHUB_REPOSITORY --pattern "${{ steps.runtime-asset.outputs.asset_name }}" --dir .runtime-download
344- Expand-Archive -Path ".runtime-download/${{ steps.runtime-asset.outputs.asset_name }}" -DestinationPath .runtime-download/unpacked -Force
345- Copy-Item .runtime-download/unpacked/runtime/* resources/runtime -Recurse -Force
314+ if ($env:GITHUB_REF -like 'refs/tags/v*') {
315+ $tag = $env:GITHUB_REF.Replace('refs/tags/', '')
316+ node ./scripts/stage-runtime.mjs --platform win32-x64 --release-tag $tag
317+ } else {
318+ node ./scripts/stage-runtime.mjs --platform win32-x64
319+ }
346320
347321 - name : Build app (Windows)
348322 env :
@@ -360,14 +334,12 @@ jobs:
360334 test -f dist-electron/preload/index.js
361335 test -f out/renderer/index.html
362336 test -f mcp-server/dist/index.js
363- if [[ "${GITHUB_REF:-}" == refs/tags/v* ]]; then
364- test -f resources/runtime/VERSION
365- fi
337+ test -f resources/runtime/VERSION
366338
367339 - name : Package (Windows)
368340 env :
369341 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
370- run : pnpm dist :win --publish never
342+ run : pnpm pack :win --publish never
371343
372344 - name : Validate packaged bundle (Windows)
373345 shell : bash
@@ -435,26 +407,18 @@ jobs:
435407 VERSION="${GITHUB_REF#refs/tags/v}"
436408 pnpm pkg set version="$VERSION"
437409
438- - name : Resolve runtime asset name (Linux)
439- if : startsWith(github.ref, 'refs/tags/v')
440- id : runtime-asset
441- shell : bash
442- run : |
443- echo "asset_name=$(node ./scripts/runtime-lock.mjs asset-name linux-x64)" >> "$GITHUB_OUTPUT"
444-
445410 - name : Stage bundled runtime (Linux)
446- if : startsWith(github.ref, 'refs/tags/v')
447411 env :
448412 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
449413 shell : bash
450414 run : |
451415 set -euo pipefail
452- TAG= "${GITHUB_REF# refs/tags/}"
453- rm -rf .runtime-download resources/runtime
454- mkdir -p . runtime-download resources/runtime
455- gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --pattern "${{ steps.runtime-asset.outputs.asset_name }}" --dir .runtime-download
456- tar -xzf ".runtime-download/${{ steps.runtime-asset.outputs.asset_name }}" -C .runtime-download
457- cp -R .runtime-download/runtime/. resources/runtime/
416+ if [[ "${GITHUB_REF:-}" == refs/tags/v* ]]; then
417+ TAG="${GITHUB_REF#refs/tags/}"
418+ node ./scripts/stage- runtime.mjs --platform linux-x64 --release-tag "$TAG"
419+ else
420+ node ./scripts/stage-runtime.mjs --platform linux-x64
421+ fi
458422
459423 - name : Build app (Linux)
460424 env :
@@ -471,14 +435,12 @@ jobs:
471435 test -f dist-electron/preload/index.js
472436 test -f out/renderer/index.html
473437 test -f mcp-server/dist/index.js
474- if [[ "${GITHUB_REF:-}" == refs/tags/v* ]]; then
475- test -f resources/runtime/VERSION
476- fi
438+ test -f resources/runtime/VERSION
477439
478440 - name : Package (Linux)
479441 env :
480442 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
481- run : pnpm dist :linux --publish never
443+ run : pnpm pack :linux --publish never
482444
483445 - name : Validate packaged bundle (Linux)
484446 run : node ./scripts/electron-builder/verifyBundle.cjs "release/linux-unpacked" linux x64
0 commit comments