2
0

RELEASE.adoc 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. = Build Locally
  57. Run the build using
  58. [source,bash]
  59. ----
  60. $ ./gradlew check
  61. ----
  62. = Push the Release Commit
  63. Push the commit and GitHub actions will build and deploy the artifacts
  64. If you are pushing to Maven Central, then you can get notified when it’s uploaded by running the following:
  65. [source,bash]
  66. ----
  67. $ ./scripts/release/wait-for-done.sh 5.5.0
  68. ----
  69. = Announce the release on Slack
  70. * Announce via Slack on
  71. https://pivotal.slack.com/messages/spring-release[#spring-release],
  72. including the keyword `+spring-security-announcing+` in the message.
  73. Something like:
  74. ....
  75. spring-security-announcing 5.5.0 is available.
  76. ....
  77. = Tag the release
  78. * Tag the release and then push the tag
  79. ....
  80. git tag 5.4.0-RC1
  81. git push origin 5.4.0-RC1
  82. ....
  83. == 7. Update to Next Development Version
  84. * Update `gradle.properties` version to next `+SNAPSHOT+` version and then push
  85. == 8. Update version on project page
  86. The following command will update https://spring.io/projects/spring-security#learn with the new release version using the following parameters
  87. <github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `public_repo`
  88. <next-version> - Replace with the milestone you are releasing now (i.e. 5.5.0-RC1)
  89. <previous-version> - Replace with the previous release which will be removed from the listed versions (i.e. 5.5.0-M3)
  90. [source,bash]
  91. ----
  92. $ ./gradlew saganCreateRelease saganDeleteRelease -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version> -PpreviousVersion=<previous-version>
  93. ----
  94. == 9. Update Release Notes on GitHub
  95. Generate the Release Notes replacing:
  96. * <next-version> - Replace with the milestone you are releasing now (i.e. 5.5.0-RC1)
  97. ----
  98. $ ./gradlew generateChangelog -P<next-version>
  99. ----
  100. * Copy the release notes to your clipboard (your mileage may vary with
  101. the following command)
  102. ....
  103. cat build/changelog/release-notes.md | xclip -selection clipboard
  104. ....
  105. * Create the
  106. https://github.com/spring-projects/spring-security/releases[release on
  107. GitHub], associate it with the tag, and paste the generated notes
  108. == 10. Close / Create Milestone
  109. * In
  110. https://github.com/spring-projects/spring-security/milestones[GitHub
  111. Milestones], create a new milestone for the next release version
  112. * Move any open issues from the existing milestone you just released to
  113. the new milestone
  114. * Close the milestone for the release.
  115. == 11. Announce the release on other channels
  116. * Create a https://spring.io/admin/blog[Blog]
  117. * Tweet from [@SpringSecurity](https://twitter.com/springsecurity)