Publish your dotnet app (WinUI 3, WPF, Console) as a zip file with auto changelog in Github Release with Github Action.
MIT License
Publish your dotnet app (WinUI 3, WPF, Console) as a zip file with auto changelog in Github Release with Github Action.
./github/workflow
folder.NOTE: currently we build your dotnet app with
dotnet-version: 8.0.x
App1/App1.csproj
MyApp
if you set to true
, before creating a new tag, we can check to see if tag exist, we go to next step, but if tag is not exsist, then we create a new tag.
if you set this to false
, we dont check it. so if tag already exist, workflow will be terminated.
false
you can add your nuget sources.
false
false
NOTE: if you enable
IS_COMMUNITY_TOOLKIT_NUGET_SOURCE_ENABLED
following CommunityToolkit sources will be added.
CommunityToolkit-Labs: https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json
CommunityToolkit-Main: https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-MainLatest/nuget/v3/index.json
publish
false
false
false
false
partial
false
NOTE: Use the
PUBLISH_TRIM_MODE
property to set the trimming granularity to eitherpartial
orfull
.
NOTE:
PUBLISH_AOT
currently support onlyConsole
App.
false
true
true
false
false
if you set a suffix (beta, alpha, preview, experimental) for version tag in your csproj file, IS_PRE_RELEASE
will be changed to true
based on suffix.
<Version>1.0.0-beta1</Version>
if you want to build your app for x64 and x86 only, you can change platform:
platform: [x64, x86]
or if you want x64 only:
platform: [x64]
there is a knonw issue for WinUI 3, if you are using Class Library in your project, you should add following code into your class library csproj file:
<EnableMsixTooling>true</EnableMsixTooling>
Otherwise, the build will fail.
for fixing this, we passed /p:GITHUB_ACTIONS=true
property into dotnet publish command.
now you can use a Directory.Build.props
file in your project root folder with following Content:
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<EnableMsixTooling>true</EnableMsixTooling>
</PropertyGroup>
This way, when you are using github action, all your projects will include EnableMsixTooling
, And the build/publish will be done successfully.