cad-editor/docs/plugin-template/.github/workflows/release.yml
Hakan Seven 1175675c5e docs(plugin): rewrite architecture + template for the external-only model
OpenCADStudio ships no built-in plugins, so the spec and scaffold no
longer describe the in-tree inventory path, demo_plugin, or the fictional
Storm Sewer reference. The architecture doc now covers the external cdylib
model end to end (ocs_plugin_api contract, export_plugin!, building +
publishing per-platform releases, runtime loading, the marketplace +
curated registry, the approach-B ABI caveat). The template becomes a
standalone cdylib crate (Cargo.toml + src/lib.rs + release workflow)
instead of an in-tree module.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 16:02:16 +03:00

44 lines
1.2 KiB
YAML

name: release
# Build the plugin cdylib for each desktop platform and attach the binaries
# (plus plugin.toml) to a GitHub Release on a v* tag. Open CAD Studio's Plugin
# Manager reads the assets, picks the one matching the user's OS/arch, and
# installs it. Rename the `asset:` files to your plugin id.
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
ext: so
asset: opencad.my_plugin-linux-x86_64.so
- os: windows-latest
ext: dll
asset: opencad.my_plugin-windows-x86_64.dll
- os: macos-latest
ext: dylib
asset: opencad.my_plugin-macos-aarch64.dylib
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- name: Stage release asset
shell: bash
run: |
mkdir -p dist
cp target/release/*.${{ matrix.ext }} "dist/${{ matrix.asset }}"
cp plugin.toml dist/plugin.toml
- uses: softprops/action-gh-release@v2
with:
files: |
dist/${{ matrix.asset }}
dist/plugin.toml