|
| 1 | +# kotlinx-datetime release checklist |
| 2 | + |
| 3 | +## Full release |
| 4 | + |
| 5 | +To release `kotlinx-datetime`: |
| 6 | + |
| 7 | +1. Make sure there are no updates to either Windows/IANA timezone name mapping |
| 8 | + or to the IANA timezone database that we publish. |
| 9 | + * <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Check_Updates> |
| 10 | + checks this automatically every night. |
| 11 | + * Follow the procedure in |
| 12 | + [UPDATE_TIMEZONE_DATABASE.md](UPDATE_TIMEZONE_DATABASE.md) |
| 13 | + if there are updates or to check for updates manually. |
| 14 | + |
| 15 | +2. Check out the `master` branch: |
| 16 | + > `git checkout master` |
| 17 | +
|
| 18 | +3. Retrieve the most recent version of it: |
| 19 | + > `git pull` |
| 20 | +
|
| 21 | +4. Search & replace `<old-version>` with `<version>` in |
| 22 | + * Documentation: [README.md](README.md) |
| 23 | + * [gradle.properties](gradle.properties) |
| 24 | + * **NOT** [CHANGELOG.md](CHANGELOG.md)! |
| 25 | + |
| 26 | +5. Write release notes in [CHANGELOG.md](CHANGELOG.md): |
| 27 | + * Follow the established style from the earlier release notes. |
| 28 | + * Write each change on a single line (don't wrap with a caret return). |
| 29 | + * Look through the commit messages since the previous release: |
| 30 | + > `git log origin/latest-release..` |
| 31 | +
|
| 32 | +6. Create a new branch for this release: |
| 33 | + > `git checkout -b version-<version>` |
| 34 | +
|
| 35 | +7. Commit and push the changes: |
| 36 | + > `git commit -a -m 'Version <version>'` |
| 37 | + > `git push -u origin version-<version>` |
| 38 | +
|
| 39 | +8. Open a GitHub pull request and review it. |
| 40 | + Wait for the CI to finish. |
| 41 | + |
| 42 | +### Publishing a normal release with the compatibility artifact |
| 43 | + |
| 44 | +For the nearest future, **follow this subsection**. |
| 45 | +When we no longer have the compatibility artifact, we'll remove the subsection. |
| 46 | + |
| 47 | +9. Create a new branch from `version-<version>`: |
| 48 | + > `git checkout -b version-<version>-compat version-<version>` |
| 49 | +
|
| 50 | +10. Replace `<version>` with `<version>-0.6.x-compat` |
| 51 | + in [gradle.properties](gradle.properties). |
| 52 | + |
| 53 | +11. Commit and push the changes: |
| 54 | + > `git commit -a -m 'Version <version>, compatibility artifact'` |
| 55 | + > `git push -u origin version-<version>-compat` |
| 56 | +
|
| 57 | +12. Create another branch from `version-<version>`: |
| 58 | + > `git checkout -b version-<version>-normal version-<version>` |
| 59 | +
|
| 60 | +13. Merge the `dkhalanskyjb/remove-deprecated-instant` branch: |
| 61 | + > `git merge dkhalanskyjb/remove-deprecated-instant` |
| 62 | +
|
| 63 | +14. Push the changes: |
| 64 | + > `git push -u origin version-<version>-normal` |
| 65 | +
|
| 66 | +15. Double-check the results. |
| 67 | + The `normal` branch should be different from `compat` in having removed |
| 68 | + a lot of code related to `kotlinx.datetime.Instant` and |
| 69 | + `kotlinx.datetime.Clock` and having a `version-<version>` in |
| 70 | + `gradle.properties` instead of `version-<version>-0.6.x-compat`. |
| 71 | + > `git diff version-<version>-compat version-<version>-normal` |
| 72 | +
|
| 73 | +16. In TeamCity, start deployment of `version-<version>-compat` by running the |
| 74 | + `Deployment/Deploy [RUN THIS ONE]` configuration: |
| 75 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_All>. |
| 76 | + Use the `Run custom build` button. |
| 77 | + - In the `Changes` tab, select the build branch `version-<version>-compat`. |
| 78 | + - In the `Parameters` tab, set the parameters: |
| 79 | + * `Version` to `<version>-0.6.x-compat`. |
| 80 | + * `Artifacts to publish` to `core only`. |
| 81 | + |
| 82 | +17. Start deployment of `version-<version>-normal`. |
| 83 | + - In the `Changes` tab, select the build branch `version-<version>-normal`. |
| 84 | + - In the `Parameters` tab, set the parameters: |
| 85 | + * `Version` to `<version>`. |
| 86 | + * `Artifacts to publish` to `all`. |
| 87 | + |
| 88 | +18. Wait for the two `Deployment/Upload deployment to central portal` |
| 89 | + tasks to finish, one for `version-<version>-normal` and |
| 90 | + one for `version-<version>-compat`: |
| 91 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Upload>. |
| 92 | + |
| 93 | +19. Click on the completed `Deployment/Upload deployment to central portal` |
| 94 | + builds, check their `Artifacts` tabs. |
| 95 | + They should have `deployment-<version>.zip` and `deployment-<version>-0.6.x-compat.zip`, |
| 96 | + correspondingly. |
| 97 | + Check the contents of these archives. |
| 98 | + The non-compat archive should contain `kotlinx-datetime` with |
| 99 | + version `<version>`, as well as the zoneinfo `<tzdb_tag>-spi.<version>`. |
| 100 | + The compat archive should contain `kotlinx-datetime` with |
| 101 | + version `<version>-0.6.x-compat`, but *NO* zoneinfo |
| 102 | + `<tzdb_tag>-spi.<version>-0.6.x-compat`! |
| 103 | + If all of this matches, approve the builds in |
| 104 | + `Deployment/Publish deployment`: |
| 105 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Publish>. |
| 106 | + |
| 107 | +20. Merge `version-<version>` into `master`: |
| 108 | + > `git checkout master` |
| 109 | + > `git merge version-<version>` |
| 110 | + > `git push` |
| 111 | +
|
| 112 | +21. In [GitHub](https://github.com/Kotlin/kotlinx-datetime): |
| 113 | + * Create a release named `v<version>`, creating the `v<version>` tag, |
| 114 | + based off of the `version-<version>-normal` branch. |
| 115 | + * Cut & paste lines from [CHANGELOG.md](CHANGELOG.md) into the description. |
| 116 | + |
| 117 | +22. Set the `latest-release` branch to `v<version>`. |
| 118 | + > `git checkout latest-release` |
| 119 | + > `git merge --ff-only master` |
| 120 | + > `git push` |
| 121 | +
|
| 122 | +23. Create the `v<version>-0.6.x-compat` tag based off of the |
| 123 | + `version-<version>-compat` branch: |
| 124 | + > `git tag v<version>-0.6.x-compat version-<version>-compat` |
| 125 | + > `git push --tags` |
| 126 | +
|
| 127 | +24. Announce the new release in [Slack](https://kotlinlang.slack.com). |
| 128 | + |
| 129 | +25. Propose the website documentation update: |
| 130 | + * In the `JetBrains/kotlin-web-site` repository: |
| 131 | + - Update `dateTimeVersion` to `<version>` in |
| 132 | + <https://github.com/JetBrains/kotlin-web-site/blob/master/docs/v.list>. |
| 133 | + - Update `KOTLINX_DATETIME_RELEASE_LABEL` to `v<version>` in |
| 134 | + <https://github.com/JetBrains/kotlin-web-site/blob/master/.teamcity/BuildParams.kt>. |
| 135 | + - Create a pull request with the changes. |
| 136 | + * In the `JetBrains/kotlin-compiler-server` repository: |
| 137 | + - Update `kotlinx-datetime` to `<version>` in |
| 138 | + <https://github.com/JetBrains/kotlin-compiler-server/blob/master/gradle/libs.versions.toml> |
| 139 | + - Create a pull request with the changes. |
| 140 | + |
| 141 | +26. Remove the `version-<version>-normal`, `version-<version>-compat`, and |
| 142 | + `version-<version>` branches. |
| 143 | + |
| 144 | +### Publishing a normal release |
| 145 | + |
| 146 | +9. In TeamCity, start deployment of `version-<version>` by running the |
| 147 | + `Deployment/Deploy [RUN THIS ONE]` configuration: |
| 148 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_All>. |
| 149 | + Use the `Run custom build` button. |
| 150 | + - In the `Changes` tab, select the build branch `version-<version>`. |
| 151 | + - In the `Parameters` tab, set the parameters: |
| 152 | + * `Version` to `<version>`. |
| 153 | + * `Artifacts to publish` to `all`. |
| 154 | + |
| 155 | +10. Wait for the `Deployment/Upload deployment to central portal` task to finish: |
| 156 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Upload>. |
| 157 | + |
| 158 | +11. Click on the completed `Deployment/Upload deployment to central portal` |
| 159 | + build, check its `Artifacts` tab, the `deployment-<version>.zip` archive. |
| 160 | + It should contain `kotlinx-datetime` for all supported targets with |
| 161 | + version `<version>`, as well as the zoneinfo `<tzdb_tag>-spi.<version>`. |
| 162 | + If this matches, approve the build in `Deployment/Publish deployment`: |
| 163 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Publish>. |
| 164 | + |
| 165 | +12. Merge `version-<version>` into `master`: |
| 166 | + > `git checkout master` |
| 167 | + > `git merge version-<version>` |
| 168 | + > `git push` |
| 169 | +
|
| 170 | +13. In [GitHub](https://github.com/Kotlin/kotlinx-datetime): |
| 171 | + * Create a release named `v<version>`, creating the `v<version>` tag, |
| 172 | + based off of the `master` branch. |
| 173 | + * Cut & paste lines from [CHANGELOG.md](CHANGELOG.md) into the description. |
| 174 | + |
| 175 | +14. Set the `latest-version` branch to `v<version>`. |
| 176 | + > `git checkout latest-release` |
| 177 | + > `git merge --ff-only master` |
| 178 | + > `git push` |
| 179 | +
|
| 180 | +15. Announce the new release in [Slack](https://kotlinlang.slack.com). |
| 181 | + |
| 182 | +16. Propose the website documentation update: |
| 183 | + * In the `JetBrains/kotlin-web-site` repository: |
| 184 | + - Update `dateTimeVersion` to `<version>` in |
| 185 | + <https://github.com/JetBrains/kotlin-web-site/blob/master/docs/v.list>. |
| 186 | + - Update `KOTLINX_DATETIME_RELEASE_LABEL` to `v<version>` in |
| 187 | + <https://github.com/JetBrains/kotlin-web-site/blob/master/.teamcity/BuildParams.kt>. |
| 188 | + - Create a pull request with the changes. |
| 189 | + * In the `JetBrains/kotlin-compiler-server` repository: |
| 190 | + - Update `kotlinx-datetime` to `<version>` in |
| 191 | + <https://github.com/JetBrains/kotlin-compiler-server/blob/master/gradle/libs.versions.toml> |
| 192 | + - Create a pull request with the changes. |
| 193 | + |
| 194 | +17. Remove the `version-<version>` branch. |
| 195 | + |
| 196 | +## Publishing just the timezone database |
| 197 | + |
| 198 | +> TODO: this section needs to be updated when either Kotlin/Wasm/WASI |
| 199 | +reaches stability or we start publishing the timezone database for other |
| 200 | +platforms. |
| 201 | +Then, it will not be enough to just publish the database for the latest version, |
| 202 | +we will need to publish the timezone database for the older `kotlinx-datetime` |
| 203 | +versions as well. |
| 204 | + |
| 205 | +1. Update the IANA timezone database as specified in |
| 206 | + [UPDATE_TIMEZONE_DATABASE.md](UPDATE_TIMEZONE_DATABASE.md). |
| 207 | + `tzdb-<tzdb_tag>` should now contain an up-to-date timezone database |
| 208 | + that wasn't yet published. |
| 209 | + |
| 210 | +2. In TeamCity, start deployment of `tzdb-<tzdb_tag>` by running the |
| 211 | + `Deployment/Deploy [RUN THIS ONE]` configuration: |
| 212 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_All>. |
| 213 | + Use the `Run custom build` button. |
| 214 | + - In the `Changes` tab, select the build branch `tzdb-<tzdb_tag>`. |
| 215 | + - In the `Parameters` tab, set the parameters: |
| 216 | + * `Version` to the latest published `kotlinx-datetime` version. |
| 217 | + Example: `0.8.0`. |
| 218 | + * `Artifacts to publish` to `zoneinfo only`. |
| 219 | + |
| 220 | +3. Wait for the `Deployment/Upload deployment to central portal` task to finish: |
| 221 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Upload>. |
| 222 | + |
| 223 | +4. Click on the completed `Deployment/Upload deployment to central portal` |
| 224 | + build, check its `Artifacts` tab, the `deployment-<version>.zip` archive |
| 225 | + (where `<version>` is the latest published `kotlinx-datetime` version, |
| 226 | + e.g. `0.8.0`). |
| 227 | + It should contain the zoneinfo `<tzdb_tag>-spi.<version>` and nothing else. |
| 228 | + If this matches, approve the build in `Deployment/Publish deployment`: |
| 229 | + <https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Publish>. |
0 commit comments