Ship mid-tier libraries through log/uuid, bump Cargo/README/CHANGELOG, and refresh the Release workflow highlights. Co-authored-by: Cursor <cursoragent@cursor.com>
179 lines
8.0 KiB
YAML
179 lines
8.0 KiB
YAML
# Build and attach release binaries when a version tag is pushed.
|
||
name: Release
|
||
|
||
on:
|
||
push:
|
||
tags:
|
||
- "v*"
|
||
|
||
permissions:
|
||
contents: write
|
||
|
||
jobs:
|
||
windows:
|
||
runs-on: windows-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
- name: Install Rust
|
||
uses: dtolnay/rust-toolchain@stable
|
||
|
||
- name: Install Node (VS Code extension)
|
||
uses: actions/setup-node@v4
|
||
with:
|
||
node-version: "20"
|
||
|
||
- name: Build release CLI + official plugins
|
||
run: |
|
||
cargo build --release
|
||
cargo build --release -p marqdo_plugin_web -p marqdo_plugin_agent -p marqdo_plugin_quantum -p marqdo_plugin_linalg
|
||
|
||
- name: Checkout extension sources (branch vscode-extension only)
|
||
run: git fetch origin vscode-extension && git checkout origin/vscode-extension -- vscode-extension
|
||
|
||
- name: Build VSIX
|
||
shell: pwsh
|
||
run: |
|
||
$ver = "${{ github.ref_name }}".TrimStart("v")
|
||
New-Item -ItemType Directory -Force -Path dist | Out-Null
|
||
Push-Location vscode-extension
|
||
npm ci
|
||
npm run compile
|
||
npx @vscode/vsce package --no-dependencies -o "../dist/marqdo-$ver.vsix"
|
||
Pop-Location
|
||
|
||
- name: Package
|
||
shell: pwsh
|
||
run: |
|
||
$ver = "${{ github.ref_name }}".TrimStart("v")
|
||
$target = "x86_64-pc-windows-msvc"
|
||
New-Item -ItemType Directory -Force -Path dist | Out-Null
|
||
$exe = "marqdo-$ver-$target.exe"
|
||
$zip = "marqdo-$ver-$target.zip"
|
||
$stdlib = "marqdo-$ver-stdlib.zip"
|
||
$source = "marqdo-$ver-source.zip"
|
||
$vsix = "marqdo-$ver.vsix"
|
||
$public = "marqdo-$ver-public.zip"
|
||
$extZip = "marqdo-$ver-ext.zip"
|
||
$nativeZip = "marqdo-$ver-native-$target.zip"
|
||
Copy-Item target/release/marqdo.exe "dist/$exe"
|
||
git archive --format=zip -o "dist/$source" HEAD
|
||
./target/release/marqdo view output public -o public
|
||
Compress-Archive -Path public/* -DestinationPath "dist/$public" -Force
|
||
$stageExt = "dist/stage-ext"
|
||
if (Test-Path $stageExt) { Remove-Item $stageExt -Recurse -Force }
|
||
New-Item -ItemType Directory -Force -Path $stageExt | Out-Null
|
||
Copy-Item ext "$stageExt/ext" -Recurse
|
||
if (Test-Path "dist/$extZip") { Remove-Item "dist/$extZip" -Force }
|
||
Compress-Archive -Path "$stageExt/*" -DestinationPath "dist/$extZip" -Force
|
||
# Prebuilt native plugins (no Rust required for `marqdo ext add`)
|
||
$stageNative = "dist/stage-native"
|
||
if (Test-Path $stageNative) { Remove-Item $stageNative -Recurse -Force }
|
||
New-Item -ItemType Directory -Force -Path "$stageNative/native" | Out-Null
|
||
Copy-Item target/release/web.dll "$stageNative/native/web.dll"
|
||
Copy-Item target/release/agent.dll "$stageNative/native/agent.dll"
|
||
Copy-Item target/release/quantum.dll "$stageNative/native/quantum.dll"
|
||
Copy-Item target/release/linalg.dll "$stageNative/native/linalg.dll"
|
||
if (Test-Path "dist/$nativeZip") { Remove-Item "dist/$nativeZip" -Force }
|
||
Compress-Archive -Path "$stageNative/*" -DestinationPath "dist/$nativeZip" -Force
|
||
$stage = "dist/stage-bundle"
|
||
if (Test-Path $stage) { Remove-Item $stage -Recurse -Force }
|
||
New-Item -ItemType Directory -Force -Path $stage | Out-Null
|
||
Copy-Item target/release/marqdo.exe "$stage/marqdo.exe"
|
||
Copy-Item lib "$stage/lib" -Recurse
|
||
Copy-Item ext "$stage/ext" -Recurse
|
||
New-Item -ItemType Directory -Force -Path "$stage/ext/native" | Out-Null
|
||
Copy-Item target/release/web.dll "$stage/ext/native/web.dll"
|
||
Copy-Item target/release/agent.dll "$stage/ext/native/agent.dll"
|
||
Copy-Item target/release/quantum.dll "$stage/ext/native/quantum.dll"
|
||
Copy-Item target/release/linalg.dll "$stage/ext/native/linalg.dll"
|
||
if (Test-Path "dist/$zip") { Remove-Item "dist/$zip" -Force }
|
||
Compress-Archive -Path "$stage/*" -DestinationPath "dist/$zip" -Force
|
||
$stageLib = "dist/stage-stdlib"
|
||
if (Test-Path $stageLib) { Remove-Item $stageLib -Recurse -Force }
|
||
New-Item -ItemType Directory -Force -Path $stageLib | Out-Null
|
||
Copy-Item lib "$stageLib/lib" -Recurse
|
||
if (Test-Path "dist/$stdlib") { Remove-Item "dist/$stdlib" -Force }
|
||
Compress-Archive -Path "$stageLib/*" -DestinationPath "dist/$stdlib" -Force
|
||
echo "EXE=$exe" >> $env:GITHUB_ENV
|
||
echo "ZIP=$zip" >> $env:GITHUB_ENV
|
||
echo "STDLIB=$stdlib" >> $env:GITHUB_ENV
|
||
echo "VSIX=$vsix" >> $env:GITHUB_ENV
|
||
echo "SOURCE=$source" >> $env:GITHUB_ENV
|
||
echo "PUBLIC=$public" >> $env:GITHUB_ENV
|
||
echo "EXT=$extZip" >> $env:GITHUB_ENV
|
||
echo "NATIVE=$nativeZip" >> $env:GITHUB_ENV
|
||
|
||
- name: Upload release assets
|
||
uses: softprops/action-gh-release@v2
|
||
with:
|
||
body: |
|
||
## Marqdo ${{ github.ref_name }}
|
||
|
||
### 亮点 / Highlights
|
||
- **中层标准库 Mid M1–M6**:`re`/`encoding`/`path`/`hash`/`secrets`/`csv`/`text++`/`cli`/`log`/`uuid`(中英对称,零插件)
|
||
- **Mid stdlib M1–M6**: regex, encoding, path, hash, secrets, csv, thickened text/lists, cli, log, uuid
|
||
- **`ext/linalg` 公式文档面 F1–F3**;agent/llm 写回与 SSE 稳健性修复
|
||
- Details: [CHANGELOG](https://github.com/cflmy/marqdo/blob/main/CHANGELOG.md) · [stdlib-mid.md](https://github.com/cflmy/marqdo/blob/main/doc/design/stdlib-mid.md)
|
||
|
||
### Downloads
|
||
|
||
| Asset | Contents |
|
||
|-------|----------|
|
||
| `marqdo-*-windows-msvc.exe` | CLI with **embedded** official stdlib |
|
||
| `marqdo-*-windows-msvc.zip` | `marqdo.exe` + `lib/` + `ext/`(含 native DLL) |
|
||
| `marqdo-*-native-*.zip` | 预编译 `web`/`agent`/`quantum` 插件 |
|
||
| `marqdo-*-stdlib.zip` | `lib/` only |
|
||
| `marqdo-*-ext.zip` | Official `ext/` L1 sources |
|
||
| `marqdo-*-source.zip` | Source snapshot (`git archive`) |
|
||
| `marqdo-*.vsix` | VS Code / Cursor extension |
|
||
| `marqdo-*-public.zip` | Static user docs site |
|
||
|
||
Extension workflow: [vscode-extension-commit.md](https://github.com/cflmy/marqdo/blob/main/doc/design/vscode-extension-commit.md)
|
||
files: |
|
||
dist/${{ env.EXE }}
|
||
dist/${{ env.ZIP }}
|
||
dist/${{ env.STDLIB }}
|
||
dist/${{ env.EXT }}
|
||
dist/${{ env.NATIVE }}
|
||
dist/${{ env.VSIX }}
|
||
dist/${{ env.SOURCE }}
|
||
dist/${{ env.PUBLIC }}
|
||
fail_on_unmatched_files: true
|
||
env:
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
||
linux-native:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Install Rust
|
||
uses: dtolnay/rust-toolchain@stable
|
||
|
||
- name: Build official plugins (release)
|
||
run: cargo build --release -p marqdo_plugin_web -p marqdo_plugin_agent -p marqdo_plugin_quantum -p marqdo_plugin_linalg
|
||
|
||
- name: Package native zip
|
||
run: |
|
||
set -euo pipefail
|
||
VER="${GITHUB_REF_NAME#v}"
|
||
TARGET="x86_64-unknown-linux-gnu"
|
||
mkdir -p dist/stage-native/native
|
||
cp target/release/libweb.so dist/stage-native/native/libweb.so
|
||
cp target/release/libagent.so dist/stage-native/native/libagent.so
|
||
cp target/release/libquantum.so dist/stage-native/native/libquantum.so
|
||
cp target/release/liblinalg.so dist/stage-native/native/liblinalg.so
|
||
(cd dist/stage-native && zip -r "../marqdo-${VER}-native-${TARGET}.zip" .)
|
||
echo "NATIVE=marqdo-${VER}-native-${TARGET}.zip" >> "$GITHUB_ENV"
|
||
|
||
- name: Upload Linux native plugins
|
||
uses: softprops/action-gh-release@v2
|
||
with:
|
||
files: dist/${{ env.NATIVE }}
|
||
fail_on_unmatched_files: true
|
||
env:
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|