@@ -156,17 +156,24 @@ public static SuccessfulAotTests AotTest(Options options, SuccessfulBuild _)
156156            return  default ; 
157157        } 
158158
159-         public  static NuGetPackage  Pack ( Options  options ,  GitVersion  version ,  SuccessfulUnitTests  _ ,  SuccessfulAotTests  __ ) 
159+         public  static List < NuGetPackage >  Pack ( Options  options ,  GitVersion  version ,  SuccessfulUnitTests  _ ,  SuccessfulAotTests  __ ) 
160160        { 
161+             var  result  =  new  List < NuGetPackage > ( ) ; 
161162            var  verbosity  =  options . Verbose  ?  "detailed"  :  "minimal" ; 
162163            var  buildDir  =  Path . Combine ( BasePath ,  "YamlDotNet" ) ; 
163164            Run ( "nuget" ,  $ "pack YamlDotNet.nuspec -Version { version . NuGetVersion }  -OutputDirectory bin",  buildDir ) ; 
164- 
165165            var  packagePath  =  Path . Combine ( buildDir ,  "bin" ,  $ "YamlDotNet.{ version . NuGetVersion } .nupkg") ; 
166-             return  new  NuGetPackage ( packagePath ) ; 
166+             result . Add ( new  NuGetPackage ( packagePath ,  "YamlDotNet" ) ) ; 
167+ 
168+             buildDir  =  Path . Combine ( BasePath ,  "YamlDotNet.Analyzers.StaticGenerator" ) ; 
169+             Run ( "nuget" ,  $ "pack YamlDotNet.Analyzers.StaticGenerator.nuspec -Version { version . NuGetVersion }  -OutputDirectory bin",  buildDir ) ; 
170+             packagePath  =  Path . Combine ( buildDir ,  "bin" ,  $ "YamlDotNet.Analyzers.StaticGenerator.{ version . NuGetVersion } .nupkg") ; 
171+             result . Add ( new  NuGetPackage ( packagePath ,  "YamlDotNet.Analyzers.StaticGenerator" ) ) ; 
172+ 
173+             return  result ; 
167174        } 
168175
169-         public  static void  Publish ( Options  options ,  GitVersion  version ,  NuGetPackage   package ) 
176+         public  static void  Publish ( Options  options ,  GitVersion  version ,  List < NuGetPackage >   packages ) 
170177        { 
171178            var  apiKey  =  Environment . GetEnvironmentVariable ( "NUGET_API_KEY" ) ; 
172179            if  ( string . IsNullOrEmpty ( apiKey ) ) 
@@ -186,13 +193,16 @@ public static void Publish(Options options, GitVersion version, NuGetPackage pac
186193            } 
187194            else 
188195            { 
189-                 Console . WriteLine ( $ "nuget push { package . Path }  -ApiKey *** -Source https://api.nuget.org/v3/index.json") ; 
190-                 Run ( "nuget" ,  $ "push { package . Path }  -ApiKey { apiKey }  -Source https://api.nuget.org/v3/index.json",  noEcho :  true ) ; 
191- 
192-                 if  ( version . IsPreRelease ) 
196+                 foreach  ( var  package  in  packages ) 
193197                { 
194-                     Console . WriteLine ( $ "nuget delete YamlDotNet { version . NuGetVersion }  -NonInteractive -ApiKey *** -Source https://api.nuget.org/v3/index.json") ; 
195-                     Run ( "nuget" ,  $ "delete YamlDotNet { version . NuGetVersion }  -NonInteractive -ApiKey { apiKey }  -Source https://api.nuget.org/v3/index.json",  noEcho :  true ) ; 
198+                     Console . WriteLine ( $ "nuget push { package . Path }  -ApiKey *** -Source https://api.nuget.org/v3/index.json") ; 
199+                     Run ( "nuget" ,  $ "push { package . Path }  -ApiKey { apiKey }  -Source https://api.nuget.org/v3/index.json",  noEcho :  true ) ; 
200+ 
201+                     if  ( version . IsPreRelease  &&  UnlistPackage ) 
202+                     { 
203+                         Console . WriteLine ( $ "nuget delete { package . Name }  { version . NuGetVersion }  -NonInteractive -ApiKey *** -Source https://api.nuget.org/v3/index.json") ; 
204+                         Run ( "nuget" ,  $ "delete { package . Name }  { version . NuGetVersion }  -NonInteractive -ApiKey { apiKey }  -Source https://api.nuget.org/v3/index.json",  noEcho :  true ) ; 
205+                     } 
196206                } 
197207            } 
198208        } 
@@ -564,12 +574,14 @@ public PreviousReleases(IEnumerable<Version> versions)
564574
565575    public  class  NuGetPackage 
566576    { 
567-         public  NuGetPackage ( string  path ) 
577+         public  NuGetPackage ( string  path ,   string   name ) 
568578        { 
569579            Path  =  path ; 
580+             Name  =  name ; 
570581        } 
571582
572583        public  string  Path  {  get ;  } 
584+         public  string  Name  {  get ;  } 
573585    } 
574586
575587    internal  class  LoggerHttpHandler  :  HttpClientHandler 
0 commit comments