{"id":15059945,"url":"https://github.com/ghost1372/dotnet-publish-action","last_synced_at":"2025-04-10T05:41:55.139Z","repository":{"id":223115425,"uuid":"759351211","full_name":"ghost1372/Dotnet-Publish-Action","owner":"ghost1372","description":"Publish your dotnet app (WinUI 3, WPF, Console) as a zip file with auto changelog in Github Release with Github Action.","archived":false,"fork":false,"pushed_at":"2024-10-19T18:16:56.000Z","size":112,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T06:54:39.227Z","etag":null,"topics":["actions","changelog","console","dotnet","dotnet-core","github","github-actions","persian","wasdk","winui3","wpf","zip"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghost1372.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-18T10:58:20.000Z","updated_at":"2024-10-19T18:17:00.000Z","dependencies_parsed_at":"2025-02-16T17:49:37.485Z","dependency_job_id":null,"html_url":"https://github.com/ghost1372/Dotnet-Publish-Action","commit_stats":null,"previous_names":["ghost1372/dotnet-publish-action"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghost1372%2FDotnet-Publish-Action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghost1372%2FDotnet-Publish-Action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghost1372%2FDotnet-Publish-Action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghost1372%2FDotnet-Publish-Action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghost1372","download_url":"https://codeload.github.com/ghost1372/Dotnet-Publish-Action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166309,"owners_count":21058475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","changelog","console","dotnet","dotnet-core","github","github-actions","persian","wasdk","winui3","wpf","zip"],"created_at":"2024-09-24T22:50:19.470Z","updated_at":"2025-04-10T05:41:55.120Z","avatar_url":"https://github.com/ghost1372.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dotnet-Publish-Action\nPublish your dotnet app (WinUI 3, WPF, Console) as a zip file with auto changelog in Github Release with Github Action.\n\n## How to use?\n- Download yml file into your repo and `./github/workflow` folder.\n- Edit yml file and Config Options:\n\n\u003e **_NOTE:_**  currently we build your dotnet app with `dotnet-version: 8.0.x`\n\n### Configuring Project\n- PROJECT_PATH: `App1/App1.csproj`\n- APP_NAME: `MyApp`\n\n### Check Tag\nif 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.\nif you set this to `false`, we dont check it. so if tag already exist, workflow will be terminated.\n\n- CHECK_TAG_EXISTENCE_BEFORE_CREATING_TAG: `false`\n\n\n### Custom Nuget Source\nyou can add your nuget sources.\n\n- IS_COMMUNITY_TOOLKIT_NUGET_SOURCE_ENABLED: `false`\n- IS_CUSTOM_NUGET_SOURCE_ENABLED: `false`\n- CUSTOM_NUGET_SOURCES: '' # Example ('https://api.nuget.org/v3/index.json, https://api.nuget.org/v2/index.json,...')\n\n\u003e **_NOTE:_**  if you enable `IS_COMMUNITY_TOOLKIT_NUGET_SOURCE_ENABLED` following CommunityToolkit sources will be added.\n\n```\nCommunityToolkit-Labs: https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json\nCommunityToolkit-Main: https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-MainLatest/nuget/v3/index.json\n```   \n\n### Configuring Dotnet Build Commands\n- PUBLISH_OUTPUT_FOLDER: `publish`\n- PUBLISH_SELF_CONTAINED: `false`\n- PUBLISH_SINGLE_FILE: `false`\n- PUBLISH_READY_TO_RUN: `false`\n- PUBLISH_TRIMMED: `false`\n- PUBLISH_TRIM_MODE: `partial`\n- PUBLISH_AOT: `false`\n\n\u003e **_NOTE:_**  Use the `PUBLISH_TRIM_MODE` property to set the trimming granularity to either `partial` or `full`.\n\n\u003e **_NOTE:_** `PUBLISH_AOT` currently support only `Console` App.\n\n### Configuring GitHub Release\n- IS_PRE_RELEASE: `false`\n- SKIP_IF_RELEASE_EXIST: `true`\n- MAKE_LATEST: `true`\n- ALLOW_UPDATES: `false`\n- ARTIFACT_ERRORS_FAIL_BUILD: `false`\n\nif 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.\n\n```xml\n\u003cVersion\u003e1.0.0-beta1\u003c/Version\u003e\n```\n\n### Platform\nif you want to build your app for x64 and x86 only, you can change platform:\n\nplatform: `[x64, x86]`\n\nor if you want x64 only:\n\nplatform: `[x64]`\n\n## WinUI 3\nthere 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:\n\n```xml\n\u003cEnableMsixTooling\u003etrue\u003c/EnableMsixTooling\u003e\n```\n\nOtherwise, the build will fail.\n\n### Solution\nfor fixing this, we passed `/p:GITHUB_ACTIONS=true` property into dotnet publish command.\n\nnow you can use a `Directory.Build.props` file in your project root folder with following Content:\n\n```xml\n\u003cPropertyGroup Condition=\"'$(GITHUB_ACTIONS)' == 'true'\"\u003e\n    \u003cEnableMsixTooling\u003etrue\u003c/EnableMsixTooling\u003e\n\u003c/PropertyGroup\u003e\n```\n\nThis way, when you are using github action, all your projects will include `EnableMsixTooling`, And the build/publish will be done successfully.\n\n---\n![Preview](Preview.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghost1372%2Fdotnet-publish-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghost1372%2Fdotnet-publish-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghost1372%2Fdotnet-publish-action/lists"}