The-Standard-Organization / ADotNet

ADotNet is a.NET library that enables software engineers on the .NET platform to develop AzureDevOps pipelines and Git Actions in C#.
98 stars 34 forks source link

Adding a PublishTask #37

Closed mabroukmahdhi closed 4 months ago

mabroukmahdhi commented 2 years ago

Hello,

could you please also add a PublishTask ? Also to deploy a .net core app to a preferred IIS.

Something like

 public class PublishTask : GithubTask
    {
        [YamlMember(Order = 1)]
        public string Run = "dotnet publish .....";
    }
lohithgn commented 2 years ago

@mabroukmahdhi

if you asking for dotnet publish - i think its already supported.

If you check the readme.md, there is a real life example to showcase publish task. Here is the code:

new DotNetExecutionTask
          {
              DisplayName = "Publish",

              Inputs = new DotNetExecutionTasksInputs
              {
                  Command = Command.publish,
                  PublishWebProjects = true
              }
          }

this is internally calling dotnet publish and depending on the .net version this will publish code to bin\debug\<.net version>\publish folder.

Hope this helps.