@@ -484,7 +484,7 @@ Task("PublishToMyGet")
484
484
. Description ( "Publish packages to MyGet" )
485
485
. Does ( ( ) =>
486
486
{
487
- if ( ! ShouldPublishToMyGet ( ) )
487
+ if ( ! ShouldPublishToMyGet )
488
488
Information ( "Nothing to publish to MyGet from this run." ) ;
489
489
else
490
490
{
@@ -516,7 +516,7 @@ Task("PublishToNuGet")
516
516
. Description ( "Publish packages to NuGet" )
517
517
. Does ( ( ) =>
518
518
{
519
- if ( ! ShouldPublishToNuGet ( ) )
519
+ if ( ! ShouldPublishToNuGet )
520
520
Information ( "Nothing to publish to NuGet from this run." ) ;
521
521
else
522
522
{
@@ -541,7 +541,7 @@ Task("PublishToChocolatey")
541
541
. Description ( "Publish packages to Chocolatey" )
542
542
. Does ( ( ) =>
543
543
{
544
- if ( ! ShouldPublishToChocolatey ( ) )
544
+ if ( ! ShouldPublishToChocolatey )
545
545
Information ( "Nothing to publish to Chocolatey from this run." ) ;
546
546
else
547
547
{
@@ -611,6 +611,34 @@ Task("CreateDraftRelease")
611
611
}
612
612
} ) ;
613
613
614
+ //////////////////////////////////////////////////////////////////////
615
+ // CREATE A PRODUCTION RELEASE
616
+ //////////////////////////////////////////////////////////////////////
617
+
618
+ Task( "CreateProductionRelease" )
619
+ . Does ( ( ) =>
620
+ {
621
+ if ( IsProductionRelease )
622
+ {
623
+ string token = EnvironmentVariable ( GITHUB_ACCESS_TOKEN ) ;
624
+ string tagName = ProductVersion ;
625
+
626
+ var assetList = new List < string > ( ) ;
627
+ foreach ( var package in AllPackages )
628
+ assetList . Add ( PACKAGE_DIR + package . PackageName ) ;
629
+ string assets = $ "\" { string . Join ( ',' , assetList . ToArray ( ) ) } \" ";
630
+
631
+ Information ( $ "Publishing release { tagName } to GitHub") ;
632
+
633
+ GitReleaseManagerAddAssets ( token , GITHUB_OWNER , GITHUB_REPO , tagName , assets ) ;
634
+ GitReleaseManagerClose ( token , GITHUB_OWNER , GITHUB_REPO , tagName ) ;
635
+ }
636
+ else
637
+ {
638
+ Information ( "Skipping CreateProductionRelease because this is not a production release" ) ;
639
+ }
640
+ } ) ;
641
+
614
642
//////////////////////////////////////////////////////////////////////
615
643
// TASK TARGETS
616
644
//////////////////////////////////////////////////////////////////////
@@ -655,7 +683,8 @@ Task("Appveyor")
655
683
. Description ( "Target we run in our AppVeyor CI" )
656
684
. IsDependentOn ( "BuildTestAndPackage" )
657
685
. IsDependentOn ( "PublishPackages" )
658
- . IsDependentOn ( "CreateDraftRelease" ) ;
686
+ . IsDependentOn ( "CreateDraftRelease" )
687
+ . IsDependentOn ( "CreateProductionRelease" ) ;
659
688
660
689
Task( "Default" )
661
690
. Description ( "Builds the engine and console runner" )
0 commit comments