The existing gradle task (./gradlew saganCreateRelease saganDeleteRelease -PnextVersion=$nextVersion -PpreviousVersion=$previousVersion) can be used to update the project page. We will need to account for handling SNAPSHOT versions, so this could be added to continuous-integration-workflow.yml as a separate task (not in the jobs.create_release job since it only runs for releases) as follows:

  1. Check if the current version exists
  2. If it exists, do nothing
  3. If it does not exist, update the project page:
    • Create the next version using the saganCreateRelease task with the current reference/api documentation links and the current project version
      • Note: Each branch may need separate/adjusted rules for the correct links since 5.2 to 5.5 use an asciidoctor site and 5.6+ use an Antora site.
    • Delete the previous version using the saganDeleteRelease task
      • Note: Requires additional logic to calculate/discover the previous version.

See https://spring.io/restdocs/index.html#release.