|
| 1 | += Update Dependencies |
| 2 | + |
| 3 | +Ensure you have no changes in your local repository. |
| 4 | +Change to a new branch. |
| 5 | +For example: |
| 6 | + |
| 7 | +[source,bash] |
| 8 | +---- |
| 9 | +$ git checkout -b 5.5.0-RC1-dependencies |
| 10 | +---- |
| 11 | + |
| 12 | +Review the rules in build.gradle to ensure the rules make sense. |
| 13 | +For example, we should not allow major version updates in a patch release. |
| 14 | +Also ensure that all of the exclusions still make sense. |
| 15 | + |
| 16 | +The following Gradle command will update your dependencies creating a commit for each dependency update. |
| 17 | +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. |
| 18 | + |
| 19 | +[source,bash] |
| 20 | +---- |
| 21 | +$ ./gradlew updateDependencies |
| 22 | +---- |
| 23 | + |
| 24 | +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. |
| 25 | + |
| 26 | +[source,bash] |
| 27 | +---- |
| 28 | +$ git log |
| 29 | +---- |
| 30 | + |
| 31 | +If any of the versions don’t make sense, update `build.gradle` to ensure that the version is excluded. |
| 32 | + |
| 33 | +Run all the checks: |
| 34 | + |
| 35 | +[source,bash] |
| 36 | +---- |
| 37 | +$ ./gradlew check |
| 38 | +---- |
| 39 | + |
| 40 | +If they don’t work, you can run a git bisect to discover what broke the build. |
| 41 | +Fix any commits that broke the build. |
| 42 | + |
| 43 | +Check out the original brach: |
| 44 | + |
| 45 | +[source,bash] |
| 46 | +---- |
| 47 | +$ git checkout - |
| 48 | +---- |
| 49 | + |
| 50 | +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: |
| 51 | + |
| 52 | +<github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `public_repo` |
| 53 | +<next-version> - Replace with the title of the milestone you are releasing now (i.e. 5.5.0-RC1) |
| 54 | + |
| 55 | +[source,bash] |
| 56 | +---- |
| 57 | +$ ./gradlew updateDependencies -PupdateMode=GITHUB_ISSUE -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version> |
| 58 | +---- |
| 59 | + |
| 60 | +Apply any fixes from your previous branch that were necessary. |
| 61 | + |
| 62 | += Check All Issues are Closed |
| 63 | + |
| 64 | +Check that all issues are closed for the milestone https://github.com/spring-projects/spring-security/milestones |
| 65 | + |
| 66 | += Update Release Version |
| 67 | + |
| 68 | +Update the version number in `gradle.properties` for the release, for example `5.5.0-M1`, `5.5.0-RC1`, `5.5.0` |
| 69 | + |
| 70 | += Build Locally |
| 71 | + |
| 72 | +Run the build using |
| 73 | + |
| 74 | +[source,bash] |
| 75 | +---- |
| 76 | +$ ./gradlew check |
| 77 | +---- |
| 78 | + |
| 79 | += Push the Release Commit |
| 80 | + |
| 81 | +Push the commit and GitHub actions will build and deploy the artifacts |
| 82 | +If you are pushing to Maven Central, then you can get notified when it’s uploaded by running the following: |
| 83 | + |
| 84 | +[source,bash] |
| 85 | +---- |
| 86 | +$ ./scripts/release/wait-for-done.sh 5.5.0 |
| 87 | +---- |
| 88 | + |
| 89 | += Announce the release on Slack |
| 90 | + |
| 91 | +* Announce via Slack on |
| 92 | +https://pivotal.slack.com/messages/spring-release[#spring-release], |
| 93 | +including the keyword `+spring-security-announcing+` in the message. |
| 94 | +Something like: |
| 95 | + |
| 96 | +.... |
| 97 | +spring-security-announcing 5.5.0 is available. |
| 98 | +.... |
| 99 | + |
| 100 | += Tag the release |
| 101 | + |
| 102 | +* Tag the release and then push the tag |
| 103 | + |
| 104 | +.... |
| 105 | +git tag 5.4.0-RC1 |
| 106 | +git push origin 5.4.0-RC1 |
| 107 | +.... |
| 108 | + |
| 109 | +== 7. Update to Next Development Version |
| 110 | + |
| 111 | +* Update `gradle.properties` version to next `+SNAPSHOT+` version and then push |
| 112 | + |
| 113 | +== 8. Update version on project page |
| 114 | + |
| 115 | +The following command will update https://spring.io/projects/spring-security#learn with the new release version using the following parameters |
| 116 | + |
| 117 | +<github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `public_repo` |
| 118 | +<next-version> - Replace with the milestone you are releasing now (i.e. 5.5.0-RC1) |
| 119 | +<previous-version> - Replace with the previous release which will be removed from the listed versions (i.e. 5.5.0-M3) |
| 120 | + |
| 121 | +[source,bash] |
| 122 | +---- |
| 123 | +$ ./gradlew saganCreateRelease saganDeleteRelease -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version> -PpreviousVersion=<previous-version> |
| 124 | +---- |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | +== 9. Update Release Notes on GitHub |
| 129 | + |
| 130 | +* Download |
| 131 | +https://github.com/spring-io/github-changelog-generator/releases/latest[the |
| 132 | +GitHub release notes generator] |
| 133 | + |
| 134 | +.... |
| 135 | +wget https://github.com/spring-io/github-changelog-generator/releases/download/v0.0.6/github-changelog-generator.jar |
| 136 | +.... |
| 137 | + |
| 138 | +* Generate the release notes |
| 139 | + |
| 140 | +.... |
| 141 | +java -jar github-changelog-generator.jar \ |
| 142 | + --changelog.repository=spring-projects/spring-security |
| 143 | + --spring.config.location=scripts/release/release-notes-sections.yml \ |
| 144 | + $MILESTONE release-notes |
| 145 | +.... |
| 146 | + |
| 147 | +Note 1: `+$MILESTONE+` is something like `+5.2.1+` or `+5.3.0-M1+`. + |
| 148 | +Note 2: The location `+scripts/release/release-notes-sections.yml+` is |
| 149 | +relative to the `+spring-security+` repo. + |
| 150 | +Note 3: This will create a file on your filesystem |
| 151 | +called `+release-notes+`. |
| 152 | + |
| 153 | +* Copy the release notes to your clipboard (your mileage may vary with |
| 154 | +the following command) |
| 155 | + |
| 156 | +.... |
| 157 | +cat release-notes | xclip -selection clipboard |
| 158 | +.... |
| 159 | + |
| 160 | +* Create the |
| 161 | +https://github.com/spring-projects/spring-security/releases[release on |
| 162 | +GitHub], associate it with the tag, and paste the generated notes |
| 163 | + |
| 164 | +== 10. Close / Create Milestone |
| 165 | + |
| 166 | +* In |
| 167 | +https://github.com/spring-projects/spring-security/milestones[GitHub |
| 168 | +Milestones], create a new milestone for the next release version |
| 169 | +* Move any open issues from the existing milestone you just released to |
| 170 | +the new milestone |
| 171 | +* Close the milestone for the release. |
| 172 | + |
| 173 | +== 11. Announce the release on other channels |
| 174 | + |
| 175 | +* Create a https://spring.io/admin/blog[Blog] |
| 176 | +* Tweet from [@SpringSecurity](https://twitter.com/springsecurity) |
| 177 | + |
| 178 | + |
0 commit comments