- Choose a new version. To avoid confusion, all the packages should follow the versioning of the upstream Telegram library, and should have the same version among them.
- Update the copyright year in the license file, if required.
- Update the
<Copyright>element in theDirectory.Build.propsandTDLib.Api/TDLib.Api.csproj, if required. - Update the upstream license information in the
README.mdandREUSE.toml, if required. - Prepare a corresponding entry in the changelog (usually by renaming the "Unreleased" section).
- Set the
<Version>in theDirectory.Build.props. - Merge all the changes to the main branch using a pull request.
- Make sure the NuGet keys you use for publishing are still active. If not, then rotate the keys as explained in the corresponding section of this document.
- Push a tag in form of
v<VERSION>, e.g.v0.0.1. GitHub Actions will do the rest (push the NuGet packages). - If the release is not synchronized with a corresponding release of tdlib.native, then it's recommended to unlist it until the corresponding release of tdlib.native is available. This will help the users to do a coordinated update and not update only a part of the libraries.
CI relies on NuGet API keys being added to the secrets. From time to time, these keys require maintenance: they will become obsolete and will have to be updated.
To update the keys:
- Sign in onto nuget.org.
- Go to the API keys section.
- Create a new (or regenerate) key with permission to Push only new package versions and only allowed to publish TDLib package. Name it
github-actions.tdlib. - Create a new (or regenerate) key with the same permission and only allowed to publish TDLib.Api package. Name it
github-actions.tdlib.api. - Paste the generated API keys to the action secrets section on GitHub settings (update the
NUGET_KEY_TDLIBandNUGET_KEY_TDLIB_APIsecrets).
- Update the
$CommitHashvariable in theScripts/Get-TlFiles.ps1to a fresh commit hash. - Run script
Scripts/Get-TlFiles.ps1to download the API definitions. - Delete the directories
ObjectsandFunctionsfrom theTdLib.Apiproject. - Run the following shell script to regenerate the C# code:
$ cd TdLib.Api && dotnet run --project ../TdLib.CodeGen