LVGLSharp CI Workflow Guide
This document explains how the current GitHub Actions CI/CD pipeline in the LVGLSharp repository is split, how the workflows depend on each other, what triggers them, and what each workflow is responsible for.
1. Design Goals
The current CI structure follows these goals:
- split “prepare version”, “build native libraries”, “build demos”, “pack NuGet”, and “publish assets” into independent stages
- make workflows reusable and easier to maintain
- ensure branch and PR runs validate the pipeline without accidentally publishing
- allow tag and manual release scenarios to reuse the same build outputs
2. Workflow Overview
2.1 .github/workflows/nuget-publish.yml
The main orchestration workflow.
Responsibilities:
- receive external triggers
- call
prepare-release.yml - call
build-native.yml - call
pack-nuget.yml - call
build-demos.ymlon tag or manual release scenarios - call
publish-release.ymlon tag or manual release scenarios
Triggers:
pushtomain/develop/masterpushtagv*pull_requesttomain/develop/masterworkflow_dispatch
2.2 .github/workflows/prepare-release.yml
Reusable workflow for release metadata preparation.
Responsibilities:
- validate the incoming version
- normalize
v9.5.0.5into9.5.0.5 - produce a standard
release_tag
Inputs:
package_version
Outputs:
package_versionrelease_tag
2.3 .github/workflows/build-native.yml
Reusable workflow for multi-platform native library assets.
Responsibilities:
- build Windows native DLLs
- build Linux native shared libraries
- validate exported symbols
- generate
sha256 - upload per-RID native artifacts
Artifacts:
native-win-x64native-win-x86native-win-arm64native-linux-x64native-linux-armnative-linux-arm64
2.4 .github/workflows/build-demos.yml
Reusable workflow for demo assets.
Responsibilities:
- build and publish Linux demo packages
- build and publish Windows demo packages
- upload demo archives
Inputs:
package_version(optional)
Artifacts:
demo-release-linux-x64demo-release-win-x64
2.5 .github/workflows/pack-nuget.yml
Reusable workflow for NuGet package assets.
Responsibilities:
- download native build artifacts
- assemble
src/LVGLSharp.Native/runtimes/{rid}/native - pack all NuGet packages
- upload
nuget-packages
Inputs:
package_version
Artifacts:
nuget-packages
2.6 .github/workflows/publish-release.yml
Reusable workflow for release publishing.
Responsibilities:
- download
nuget-packages - download
demo-release-* - collect
release_assets - publish to GitHub Release
- publish to NuGet.org
- publish to GitHub Packages
Inputs:
release_tagpublish_nugetpublish_github
3. Dependency Graph
The overall dependency structure is:
nuget-publish.yml
├─ prepare-release.yml
├─ build-native.yml
├─ pack-nuget.yml
├─ build-demos.yml (tag / manual release only)
└─ publish-release.yml (tag / manual release only)
Execution order:
prepare
└─ build-native
└─ pack
prepare
└─ build-demos (tag / workflow_dispatch only)
prepare + pack + build-demos
└─ publish (tag / manual release only)
4. Behavior by Trigger Type
4.1 Branch Push
Runs:
preparebuild-nativepack
Does not run:
build-demospublish
Purpose:
- validate version normalization, native library build, and NuGet packaging pipeline
4.2 Pull Request
Runs:
preparebuild-nativepack
Does not run:
build-demospublish
Purpose:
- validate core build and packaging steps before merge
4.3 Tag Release
Runs:
preparebuild-nativepackbuild-demospublish
Purpose:
- generate and publish the complete release asset set
4.4 Manual workflow_dispatch
By default, manual runs allow you to:
- choose a version number
- choose whether to publish to NuGet.org
- choose whether to publish to GitHub Packages
If publishing is not enabled:
- the pipeline stops at the build stage
If publishing is enabled:
- the full release flow is executed
5. Version Rules
Current version rules:
- only four-part numeric versions are accepted
- valid examples:
9.5.0.5v9.5.0.5
After normalization:
package_version = 9.5.0.5release_tag = v9.5.0.5
6. Artifact Types
Native Library Artifacts
Produced by build-native.yml:
- multi-platform
.dll/.so - corresponding
.sha256files
Demo Artifacts
Produced by build-demos.yml:
- Windows zip package
- Linux tar.gz package
NuGet Artifacts
Produced by pack-nuget.yml:
LVGLSharp.AnalyzersLVGLSharp.NativeLVGLSharp.InteropLVGLSharp.CoreLVGLSharp.DrawingLVGLSharp.Runtime.WindowsLVGLSharp.Runtime.LinuxLVGLSharp.Runtime.HeadlessLVGLSharp.Runtime.MacOsLVGLSharp.Runtime.RemoteLVGLSharp.FormsLVGLSharp.WPF
7. Why the Pipeline Is Split This Way
This decomposition brings several benefits:
- failures are easier to localize
- stages are reusable
- future expansion toward macOS, Wayland, and more runtimes becomes easier
- the main orchestration file stays smaller and clearer
- release engineering and documentation workflows can evolve independently
8. Recommended Maintenance Rules
Recommended conventions going forward:
- orchestration workflows should only coordinate, not embed large build logic blocks
- reusable workflows should document inputs and outputs clearly
- artifact names should stay stable to avoid downstream churn
- manual input descriptions should follow a consistent format
- branch and PR runs should stay validation-focused, while publishing remains limited to tag or explicit manual release scenarios
If the repository later adds a GitHub Pages documentation publishing workflow, it can continue to build on this same decomposed CI structure.