RELEASE.adoc 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. = Update Dependencies
  2. Ensure you have no changes in your local repository.
  3. Change to a new branch.
  4. For example:
  5. [source,bash]
  6. ----
  7. $ git checkout -b 5.5.0-RC1-dependencies
  8. ----
  9. Review the rules in build.gradle to ensure the rules make sense.
  10. For example, we should not allow major version updates in a patch release.
  11. Also ensure that all of the exclusions still make sense.
  12. The following Gradle command will update your dependencies creating a commit for each dependency update.
  13. The first invocation of the command will take quite a while (~20 minutes depending on internet speed) to run because it is indexing all the versions of all the dependencies.
  14. [source,bash]
  15. ----
  16. $ ./gradlew updateDependencies
  17. ----
  18. Review the commits to ensure that the updated dependency versions make sense for this release. For example, we should not perform a major version update for a patch release.
  19. [source,bash]
  20. ----
  21. $ git log
  22. ----
  23. If any of the versions don’t make sense, update `build.gradle` to ensure that the version is excluded.
  24. Run all the checks:
  25. [source,bash]
  26. ----
  27. $ ./gradlew check
  28. ----
  29. If they don’t work, you can run a git bisect to discover what broke the build.
  30. Fix any commits that broke the build.
  31. Check out the original brach:
  32. [source,bash]
  33. ----
  34. $ git checkout -
  35. ----
  36. The following command will update the dependencies again but this time creating a ticket for each update and placing `Closes gh-<number>` in the commit. Replacing the following values:
  37. * <github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `public_repo`
  38. * <next-version> - Replace with the title of the milestone you are releasing now (i.e. 5.5.0-RC1)
  39. [source,bash]
  40. ----
  41. $ ./gradlew updateDependencies -PupdateMode=GITHUB_ISSUE -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version>
  42. ----
  43. Apply any fixes from your previous branch that were necessary.
  44. = Check All Issues are Closed
  45. The following command will check if there are any open issues for the ticket.
  46. Before running the command, replace the following values:
  47. * <github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `public_repo`. This is optional since you are unlikely to reach the rate limit for such a simple check.
  48. * <next-version> - Replace with the title of the milestone you are releasing now (i.e. 5.5.0-RC1)
  49. [source,bash]
  50. ----
  51. $ ./gradlew gitHubCheckMilestoneHasNoOpenIssues -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version>
  52. ----
  53. Alternatively, you can manually check using https://github.com/spring-projects/spring-security/milestones
  54. = Update Release Version
  55. Update the version number in `gradle.properties` for the release, for example `5.5.0-M1`, `5.5.0-RC1`, `5.5.0`
  56. = Update Antora Version
  57. You will need to update the antora.yml version.
  58. If you are unsure of what the values should be, the following task will instruct you what the expected values are:
  59. [source,bash]
  60. ----
  61. ./gradlew :spring-security-docs:antoraCheckVersion
  62. ----
  63. = Build Locally
  64. Run the build using
  65. [source,bash]
  66. ----
  67. $ ./gradlew check
  68. ----
  69. = Push the Release Commit
  70. Push the commit and GitHub actions will build and deploy the artifacts
  71. If you are pushing to Maven Central, then you can get notified when it’s uploaded by running the following:
  72. [source,bash]
  73. ----
  74. $ ./scripts/release/wait-for-done.sh 5.5.0
  75. ----
  76. = Announce the release on Slack
  77. * Announce via Slack on
  78. https://pivotal.slack.com/messages/spring-release[#spring-release],
  79. including the keyword `+spring-security-announcing+` in the message.
  80. Something like:
  81. ....
  82. spring-security-announcing 5.5.0 is available.
  83. ....
  84. = Tag the release
  85. * Tag the release and then push the tag
  86. ....
  87. git tag 5.4.0-RC1
  88. git push origin 5.4.0-RC1
  89. ....
  90. == 7. Update to Next Development Version
  91. * Update `gradle.properties` version to next `+SNAPSHOT+` version, update antora.yml, and then push
  92. == 8. Update version on project page
  93. The following command will update https://spring.io/projects/spring-security#learn with the new release version using the following parameters
  94. <github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `read:org` as https://spring.io/restdocs/index.html#authentication[documented for spring.io api]
  95. <next-version> - Replace with the milestone you are releasing now (i.e. 5.5.0-RC1)
  96. <previous-version> - Replace with the previous release which will be removed from the listed versions (i.e. 5.5.0-M3)
  97. [source,bash]
  98. ----
  99. $ ./gradlew saganCreateRelease saganDeleteRelease -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version> -PpreviousVersion=<previous-version>
  100. ----
  101. == 9. Update Release Notes on GitHub
  102. Generate the Release Notes replacing:
  103. * <next-version> - Replace with the milestone you are releasing now (i.e. 5.5.0-RC1)
  104. ----
  105. $ ./gradlew generateChangelog -PnextVersion=<next-version>
  106. ----
  107. * Copy the release notes to your clipboard (your mileage may vary with
  108. the following command)
  109. ....
  110. cat build/changelog/release-notes.md | xclip -selection clipboard
  111. ....
  112. * Create the
  113. https://github.com/spring-projects/spring-security/releases[release on
  114. GitHub], associate it with the tag, and paste the generated notes
  115. == 10. Close / Create Milestone
  116. * In
  117. https://github.com/spring-projects/spring-security/milestones[GitHub
  118. Milestones], create a new milestone for the next release version
  119. * Move any open issues from the existing milestone you just released to
  120. the new milestone
  121. * Close the milestone for the release.
  122. == 11. Announce the release on other channels
  123. * Create a https://spring.io/admin/blog[Blog]
  124. * Tweet from [@SpringSecurity](https://twitter.com/springsecurity)