@@ -619,6 +619,29 @@ func RegisterReleaseWorkflows(h *DefinitionHolder, build *BuildReleaseTasks, mil
619
619
return err
620
620
}
621
621
h .RegisterDefinition ("Minor releases for Go 1.17 and 1.18" , wd )
622
+ wd = workflow .New ()
623
+ if err := addBuildAndTestOnlyWorkflow (wd , version , build , "go1.19" , task .KindBeta ); err != nil {
624
+ return err
625
+ }
626
+ h .RegisterDefinition ("dry-run (test and build only): Go 1.19 next beta" , wd )
627
+
628
+ return nil
629
+ }
630
+
631
+ func addBuildAndTestOnlyWorkflow (wd * workflow.Definition , version * task.VersionTasks , build * BuildReleaseTasks , major string , kind task.ReleaseKind ) error {
632
+ nextVersion := wd .Task ("Get next version" , version .GetNextVersion , wd .Constant (kind ))
633
+ branch := fmt .Sprintf ("release-branch.%v" , major )
634
+ if kind == task .KindBeta {
635
+ branch = "master"
636
+ }
637
+ branchVal := wd .Constant (branch )
638
+ releaseBase := wd .Task ("Pick release base commit" , version .ReadBranchHead , branchVal )
639
+ noop := wd .Action ("noop" , func (_ * workflow.TaskContext ) error { return nil })
640
+ artifacts , err := build .addBuildTasks (wd , major , nextVersion , releaseBase , wd .Constant ([]string {}), true , noop )
641
+ if err != nil {
642
+ return err
643
+ }
644
+ wd .Output ("Artifacts" , artifacts )
622
645
return nil
623
646
}
624
647
@@ -687,7 +710,7 @@ func addSingleReleaseWorkflow(
687
710
wd .Output ("Signing command" , startSigner )
688
711
689
712
// Build, test, and sign release.
690
- signedAndTestedArtifacts , err := build .addBuildTasks (wd , "go1.19" , nextVersion , releaseBase , skipTests , checked )
713
+ signedAndTestedArtifacts , err := build .addBuildTasks (wd , "go1.19" , nextVersion , releaseBase , skipTests , false , checked )
691
714
if err != nil {
692
715
return nil , err
693
716
}
@@ -714,7 +737,7 @@ func addSingleReleaseWorkflow(
714
737
715
738
// addBuildTasks registers tasks to build, test, and sign the release onto wd.
716
739
// It returns the output from the last task, a slice of signed and tested artifacts.
717
- func (tasks * BuildReleaseTasks ) addBuildTasks (wd * workflow.Definition , majorVersion string , version , revision , skipTests workflow.Value , dependency workflow.Dependency ) (workflow.Value , error ) {
740
+ func (tasks * BuildReleaseTasks ) addBuildTasks (wd * workflow.Definition , majorVersion string , version , revision , skipTests workflow.Value , skipSigning bool , dependency workflow.Dependency ) (workflow.Value , error ) {
718
741
targets , ok := releasetargets .TargetsForVersion (majorVersion )
719
742
if ! ok {
720
743
return nil , fmt .Errorf ("malformed/unknown version %q" , majorVersion )
@@ -753,6 +776,12 @@ func (tasks *BuildReleaseTasks) addBuildTasks(wd *workflow.Definition, majorVers
753
776
testsPassed = append (testsPassed , long )
754
777
}
755
778
}
779
+ if skipSigning {
780
+ builtAndTested := wd .Task ("Wait for artifacts and tests" , func (ctx * workflow.TaskContext , artifacts []artifact ) ([]artifact , error ) {
781
+ return artifacts , nil
782
+ }, append ([]workflow.TaskInput {wd .Slice (artifacts ... )}, testsPassed ... )... )
783
+ return builtAndTested , nil
784
+ }
756
785
stagedArtifacts := wd .Task ("Stage artifacts for signing" , tasks .copyToStaging , version , wd .Slice (artifacts ... ))
757
786
signedArtifacts := wd .Task ("Wait for signed artifacts" , tasks .awaitSigned , version , wd .Constant (darwinTargets ), stagedArtifacts )
758
787
signedAndTested := wd .Task ("Wait for signing and tests" , func (ctx * workflow.TaskContext , artifacts []artifact ) ([]artifact , error ) {
0 commit comments