To release kotlinx-datetime:
-
Make sure there are no updates to either Windows/IANA timezone name mapping or to the IANA timezone database that we publish.
- https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Check_Updates checks this automatically every night.
- Follow the procedure in UPDATE_TIMEZONE_DATABASE.md if there are updates or to check for updates manually.
-
Check out the
masterbranch:git checkout master -
Retrieve the most recent version of it:
git pull -
Search & replace
<old-version>with<version>in- Documentation: README.md
- gradle.properties
- NOT CHANGELOG.md!
-
Write release notes in CHANGELOG.md:
- Follow the established style from the earlier release notes.
- Write each change on a single line (don't wrap with a caret return).
- Look through the commit messages since the previous release:
git log origin/latest-release..
-
Create a new branch for this release:
git checkout -b version-<version> -
Commit and push the changes:
git commit -a -m 'Version <version>'git push -u origin version-<version> -
Open a GitHub pull request and review it. Wait for the CI to finish.
For the nearest future, follow this subsection. When we no longer have the compatibility artifact, we'll remove the subsection.
-
Create a new branch from
version-<version>:git checkout -b version-<version>-compat version-<version> -
Replace
<version>with<version>-0.6.x-compatin gradle.properties. -
Commit and push the changes:
git commit -a -m 'Version <version>, compatibility artifact'git push -u origin version-<version>-compat
- Create another branch from
version-<version>:
git checkout -b version-<version>-normal version-<version>
- Merge the
dkhalanskyjb/remove-deprecated-instantbranch:
git merge dkhalanskyjb/remove-deprecated-instant
- Push the changes:
git push -u origin version-<version>-normal
- Double-check the results.
The
normalbranch should be different fromcompatin having removed a lot of code related tokotlinx.datetime.Instantandkotlinx.datetime.Clockand having aversion-<version>ingradle.propertiesinstead ofversion-<version>-0.6.x-compat.
git diff version-<version>-compat version-<version>-normal
- In TeamCity, start deployment of
version-<version>-compatby running theDeployment/Deploy [RUN THIS ONE]configuration: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_All. Use theRun custom buildbutton.
- In the
Changestab, select the build branchversion-<version>-compat. - In the
Parameterstab, set the parameters:Versionto<version>-0.6.x-compat.Artifacts to publishtocore only.
- Start deployment of
version-<version>-normal.
- In the
Changestab, select the build branchversion-<version>-normal. - In the
Parameterstab, set the parameters:Versionto<version>.Artifacts to publishtoall.
-
Wait for the two
Deployment/Upload deployment to central portaltasks to finish, one forversion-<version>-normaland one forversion-<version>-compat: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Upload. -
Click on the completed
Deployment/Upload deployment to central portalbuilds, check theirArtifactstabs. They should havedeployment-<version>.zipanddeployment-<version>-0.6.x-compat.zip, correspondingly. Check the contents of these archives. The non-compat archive should containkotlinx-datetimewith version<version>, as well as the zoneinfo<tzdb_tag>-spi.<version>. The compat archive should containkotlinx-datetimewith version<version>-0.6.x-compat, but NO zoneinfo<tzdb_tag>-spi.<version>-0.6.x-compat! If all of this matches, approve the builds inDeployment/Publish deployment: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Publish. -
Merge
version-<version>intomaster:
git checkout mastergit merge version-<version>git push
- In GitHub:
- Create a release named
v<version>, creating thev<version>tag, based off of theversion-<version>-normalbranch. - Cut & paste lines from CHANGELOG.md into the description.
- Set the
latest-releasebranch tov<version>.
git checkout latest-releasegit merge --ff-only mastergit push
- Create the
v<version>-0.6.x-compattag based off of theversion-<version>-compatbranch:
git tag v<version>-0.6.x-compat version-<version>-compatgit push --tags
-
Announce the new release in Slack.
-
Propose the website documentation update:
- In the
JetBrains/kotlin-web-siterepository:- Update
dateTimeVersionto<version>in https://github.com/JetBrains/kotlin-web-site/blob/master/docs/v.list. - Update
KOTLINX_DATETIME_RELEASE_LABELtov<version>in https://github.com/JetBrains/kotlin-web-site/blob/master/.teamcity/BuildParams.kt. - Create a pull request with the changes.
- Update
- In the
JetBrains/kotlin-compiler-serverrepository:- Update
kotlinx-datetimeto<version>in https://github.com/JetBrains/kotlin-compiler-server/blob/master/gradle/libs.versions.toml - Create a pull request with the changes.
- Update
- Remove the
version-<version>-normal,version-<version>-compat, andversion-<version>branches.
-
In TeamCity, start deployment of
version-<version>by running theDeployment/Deploy [RUN THIS ONE]configuration: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_All. Use theRun custom buildbutton.- In the
Changestab, select the build branchversion-<version>. - In the
Parameterstab, set the parameters:Versionto<version>.Artifacts to publishtoall.
- In the
-
Wait for the
Deployment/Upload deployment to central portaltask to finish: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Upload. -
Click on the completed
Deployment/Upload deployment to central portalbuild, check itsArtifactstab, thedeployment-<version>.ziparchive. It should containkotlinx-datetimefor all supported targets with version<version>, as well as the zoneinfo<tzdb_tag>-spi.<version>. If this matches, approve the build inDeployment/Publish deployment: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Publish. -
Merge
version-<version>intomaster:
git checkout mastergit merge version-<version>git push
- In GitHub:
- Create a release named
v<version>, creating thev<version>tag, based off of themasterbranch. - Cut & paste lines from CHANGELOG.md into the description.
- Set the
latest-versionbranch tov<version>.
git checkout latest-releasegit merge --ff-only mastergit push
-
Announce the new release in Slack.
-
Propose the website documentation update:
- In the
JetBrains/kotlin-web-siterepository:- Update
dateTimeVersionto<version>in https://github.com/JetBrains/kotlin-web-site/blob/master/docs/v.list. - Update
KOTLINX_DATETIME_RELEASE_LABELtov<version>in https://github.com/JetBrains/kotlin-web-site/blob/master/.teamcity/BuildParams.kt. - Create a pull request with the changes.
- Update
- In the
JetBrains/kotlin-compiler-serverrepository:- Update
kotlinx-datetimeto<version>in https://github.com/JetBrains/kotlin-compiler-server/blob/master/gradle/libs.versions.toml - Create a pull request with the changes.
- Update
- Remove the
version-<version>branch.
TODO: this section needs to be updated when either Kotlin/Wasm/WASI reaches stability or we start publishing the timezone database for other platforms. Then, it will not be enough to just publish the database for the latest version, we will need to publish the timezone database for the older
kotlinx-datetimeversions as well.
-
Update the IANA timezone database as specified in UPDATE_TIMEZONE_DATABASE.md.
tzdb-<tzdb_tag>should now contain an up-to-date timezone database that wasn't yet published. -
In TeamCity, start deployment of
tzdb-<tzdb_tag>by running theDeployment/Deploy [RUN THIS ONE]configuration: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_All. Use theRun custom buildbutton.- In the
Changestab, select the build branchtzdb-<tzdb_tag>. - In the
Parameterstab, set the parameters:Versionto the latest publishedkotlinx-datetimeversion. Example:0.8.0.Artifacts to publishtozoneinfo only.
- In the
-
Wait for the
Deployment/Upload deployment to central portaltask to finish: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Upload. -
Click on the completed
Deployment/Upload deployment to central portalbuild, check itsArtifactstab, thedeployment-<version>.ziparchive (where<version>is the latest publishedkotlinx-datetimeversion, e.g.0.8.0). It should contain the zoneinfo<tzdb_tag>-spi.<version>and nothing else. If this matches, approve the build inDeployment/Publish deployment: https://teamcity.jetbrains.com/buildConfiguration/KotlinTools_KotlinxDatetime_Deploy_Publish.