private static void PublishNuGet(ICakeContext ctx, TaskConfig cfg, NuGetPublisher nuget) { EnvConfig env = cfg.Load <EnvConfig>(); ctx.DotNetCorePack(nuget.ProjectFile, new DotNetCorePackSettings { Configuration = env.Configuration, OutputDirectory = nuget.OutputLocation, Verbosity = ctx.Log.Verbosity.ToVerbosity(), ArgumentCustomization = arg => { arg.Append($"/p:Version={env.Version.Build}"); if (nuget.PublishAsSnupkg) { arg.Append("/p:SymbolPackageFormat=snupkg"); } return(arg); }, IncludeSource = true, IncludeSymbols = true, }); IEnumerable <string> packageFiles = Directory.EnumerateFiles(nuget.OutputLocation, nuget.PublishAsSnupkg ? "*.snupkg" : "*.nupkg"); foreach (string packageFile in packageFiles) { ctx.DotNetCoreNuGetPush(packageFile, new DotNetCoreNuGetPushSettings { Source = nuget.Source(env.Branch), ApiKey = nuget.ApiKey?.Invoke(env.Branch), }); } }
public ProjectIdMandatory(NuGetPublisher parent) : base(parent) { }
public ApiKeyMandatory(NuGetPublisher parent) : base(parent) { }
public DescriptionMandatory(NuGetPublisher parent) : base(parent) { }
public OptionBase(NuGetPublisher parent) { _parent = parent; }