Add workflow step for scheduling the next milestone
This step introduces the concept of a release train to determine the appropriate release dates and schedules milestones as needed. It uses the following rules: - If the current SNAPSHOT version is a minor release (patchVersion == 0), checks to see if a GA release exists. If not, a release train is scheduled as follows: - Finds the next available release train starting month (including this month), either January or July. - Schedules a release train with M1, M2, M3, RC1 and GA versions on either January/February/March/April/May or July/August/September/October/November - If the current SNAPSHOT version is a patch release (patchVersion != 0), checks to see if a GA release exists. If not, an individual milestone is scheduled on the next even month whose release day is in the future (can include this month). - In either case, the release day used to schedule the release is based on the configured weekOfMonth (1-4) and dayOfWeek (1-5), e.g. 3rd Monday of the month (3, 1). If a milestone already exists, nothing is created. Once created, milestone due dates can be updated manually as desired. Closes gh-10458
This commit is contained in:
committed by
Steve Riesenberg
parent
ab3b6ae95f
commit
46723a601c
+5
@@ -19,6 +19,7 @@ package org.springframework.gradle.github.milestones;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
|
||||
import org.gradle.api.Action;
|
||||
import org.gradle.api.DefaultTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
@@ -104,6 +105,10 @@ public class ScheduleNextReleaseTask extends DefaultTask {
|
||||
return this.repository;
|
||||
}
|
||||
|
||||
public void repository(Action<RepositoryRef> repository) {
|
||||
repository.execute(this.repository);
|
||||
}
|
||||
|
||||
public void setRepository(RepositoryRef repository) {
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user