DevOps & CI/CD · Multi-Target Packaging

Automated GitHub Actions CI/CD Pipeline for Multi-Version GstarCAD GRX C++ & .NET Bundle Packaging (dev-cookbook-30)

Configure MSBuild matrix builds, code-signing certificates, and Autoloader .bundle packaging in GitHub Actions for GstarCAD 2025, 2026, and 2027 plugins.

1. Multi-Target MSBuild Configurations for GstarCAD 2025–2027

Commercial ISVs and enterprise R&D teams shipping plugins for GstarCAD rarely compile binaries manually on developer laptops. By setting up a **GitHub Actions (or GitLab CI / Azure DevOps)** matrix pipeline using `windows-2022` runners, a single `git tag v2.4.0` push can automatically compile both native C++ `.grx` binaries (`v142` / `v143` MSVC toolsets) and managed `.NET` (`net48` / `net8.0-windows`) assemblies against GstarCAD 2025, 2026, and 2027 SDK headers, sign them with an EV Authenticode certificate, and package everything into a universal **`ApplicationPlugins/*.bundle`** installer.

2. Production `.github/workflows/build-gstarcad-bundle.yml` Pipeline

The GitHub Actions workflow below runs a multi-version MSBuild matrix, verifies `False` (`CopyLocal = False`) on `GdbMgd.dll` and `GcadMgd.dll` so SDK assemblies never pollute your output folder, and packs the universal `.bundle`:

name: Build & Package GstarCAD GRX/.NET Bundle

on:
  push:
    branches: [ main ]
    tags: [ 'v*.*.*' ]
  pull_request:
    branches: [ main ]

jobs:
  msbuild-matrix:
    runs-on: windows-2022
    strategy:
      fail-fast: false
      matrix:
        gcad_year: [ '2025', '2026', '2027' ]
    steps:
      - name: Checkout Plugin Repository
        uses: actions/checkout@v4

      - name: Setup MSBuild & Visual Studio 2022 C++ / .NET Toolset
        uses: microsoft/setup-msbuild@v2

      - name: Restore NuGet & GstarCAD SDK Headers
        run: nuget restore GstarEnterprisePlugin.sln

      - name: Compile C++ GRX & C# .NET Targets (Release|x64)
        run: |
          msbuild GstarEnterprisePlugin.sln `
            /p:Configuration=Release_${{ matrix.gcad_year }} `
            /p:Platform=x64 `
            /p:CopyLocalLockFileAssemblies=false `
            /m /v:minimal

      - name: Verify Zero SDK DLL Leakage in Output Directory
        shell: pwsh
        run: |
          $leaked = Get-ChildItem "bin/Release_${{ matrix.gcad_year }}" -Include "GdbMgd.dll","GcadMgd.dll" -Recurse
          if ($leaked) { throw "ERROR: Set CopyLocal=False on GdbMgd/GcadMgd references!" }

      - name: Stage into ApplicationPlugins Autoloader .bundle Structure
        shell: pwsh
        run: |
          $dest = "dist/CorpTools.bundle/Contents/Win64/${{ matrix.gcad_year }}"
          New-Item -ItemType Directory -Force -Path $dest | Out-Null
          Copy-Item "bin/Release_${{ matrix.gcad_year }}/*.grx" $dest -ErrorAction SilentlyContinue
          Copy-Item "bin/Release_${{ matrix.gcad_year }}/*.dll" $dest -ErrorAction SilentlyContinue

      - name: Upload Compiled Year Artifacts
        uses: actions/upload-artifact@v4
        with:
          name: bundle-${{ matrix.gcad_year }}
          path: dist/CorpTools.bundle

3. Universal `PackageContents.xml` Version-Routing Schema

Inside `CorpTools.bundle/PackageContents.xml`, declare separate `` blocks with `SeriesMin` and `SeriesMax` attributes pointing to `Contents/Win64/2025`, `Contents/Win64/2026`, and `Contents/Win64/2027`. When an IT administrator drops `CorpTools.bundle` into `%ProgramData%\Gstarsoft\ApplicationPlugins\`, every installed GstarCAD release automatically loads its exact matching binary on startup without touching the Windows Registry.

4. Automated Headless Smoke Testing (`gcad.exe /b`) in GitHub Actions

Beyond compiling binaries, your CI/CD pipeline can verify that the newly built `.grx` or `.dll` actually loads and executes cleanly inside GstarCAD 2027. Add a post-build smoke-test step on a self-hosted Windows runner that invokes `gcad.exe "tests/fixture.dwg" /b "tests/ci_smoke_test.scr"`. Inside `ci_smoke_test.scr`, call `(arxload "CorpPlugin.grx")` (or `NETLOAD`), execute your test command, write a `"PASS"` token to `ci_result.txt`, and call `._QUIT _Y`.

Validate This Workflow in GstarCAD 2027

Engineered by Suzhou Gstarsoft Co., Ltd. (SSE: 688657), GstarCAD 2027 delivers 100% native AC1032 DWG binary fidelity, perpetual licensing sovereignty, and zero-day AutoCAD command parity.

Download Free 30-Day Evaluation → Explore AutoCAD Migration Hub Take Skill Certification Quiz