RELEASE.adoc 5.3 KB

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