Visual Studio Templates Release Workflow
Quick Reference
- Workflow file:
.github/workflows/templates-release.yml - Workflow name:
Visual Studio Templates Release - Triggers:
push(template-related paths),workflow_dispatch - Runner:
windows-2025-vs2026 - Permissions:
contents: write - Environment:
production
Overview
The templates-release.yml workflow builds and publishes Visual Studio template artifacts (ZIP templates and VSIX package) to GitHub Releases.
- Workflow file:
.github/workflows/templates-release.yml - Workflow name:
Visual Studio Templates Release - Runner:
windows-2025-vs2026 - Environment:
production
Purpose
- Package Krypton item/project templates in distributable formats.
- Build a VSIX installer for one-click template installation in Visual Studio.
- Publish channel-specific artifacts to GitHub Releases.
Triggers
The workflow runs on:
pushtomaster,alpha,canary,V110- only when files under
Templates/**or the workflow file itself change - manual trigger via
workflow_dispatch
Kill Switch
Variable: TEMPLATES_RELEASE_DISABLED
true-> workflow logs warning and exits via step gating.falseor unset -> workflow proceeds.
Location: Repository Settings -> Secrets and variables -> Actions -> Variables.
Channel Resolution
Release metadata is derived from the source branch:
master->stablecanary->canaryalpha->alphaV110->current- other branches ->
dev-<sanitized-branch>
The workflow computes:
- release tag
- release title
- prerelease flag
- build-stamped template version (
<channel>-<UTC timestamp>) - VSIX version (
110.0.MMdd.HHmm)
Artifacts Produced
The workflow creates:
- Item template zip:
Krypton Form - Item template zip:
Krypton Ribbon Form - Project template zip:
Krypton WinForms App - Project template zip:
Krypton Ribbon WinForms App - Bundle zip of full
Templatestree - VSIX package built from
Templates/Vsix/Krypton.Templates.Vsix
All artifacts are also uploaded as workflow artifacts using actions/upload-artifact@v4.
VSIX Build Details
Before building VSIX:
- The workflow updates
source.extension.vsixmanifestversion dynamically. - It writes UTF-8 content without BOM handling issues.
Build execution:
dotnet restoreon VSIX projectdotnet msbuildwith:Configuration=ReleaseDeployExtension=falseVsixVersion=<computed>
Publishing
Publishing uses softprops/action-gh-release@v2:
tag_nameand release metadata from resolved channel.make_latest=trueonly for stable channel.- Existing files are overwritten (
overwrite_files: true).
Release body includes installation guidance and asset list.
Permissions and Safety
- Permission scope:
contents: write - No external package publication (NuGet) in this workflow.
- Environment protection (
production) can enforce approvals.
Troubleshooting
Workflow skips immediately
Check TEMPLATES_RELEASE_DISABLED.
Missing artifact errors
Check template directories exist:
Templates/ItemTemplates/KryptonFormTemplates/ItemTemplates/KryptonRibbonFormTemplates/ProjectTemplates/KryptonWinFormsAppTemplates/ProjectTemplates/KryptonRibbonWinFormsAppTemplates/README.md
VSIX not produced
Check:
- VSIX project path and manifest path exist.
- Manifest version replacement succeeded.
- Build logs under VSIX build step.