Build And Release - STARIONGROUP/COMET-SDK-Community-Edition GitHub Wiki

Development Environment

The CDP4-COMET SDK libraries are developed using Visual Studio 2022 and Jetbrains Rider

The following tools are used by the Starion development team:

  • Visual Studio 2022 Professional (Community Edtion will work as well)
  • Jetbrains Resharper Ultimate 2023.1 or later
  • Jetbrains Rider
  • Git Extensions

Build

The CDP4-COMET SDK solution contains two build configurations:

  • debug: used while developing new features
  • release: used to create a build for release

Release

The CDP4-SDK libraries are released as nuget packages on https://nuget.org. The release process is automated with a Github Action that is invoked manualy and is provided the version number: https://github.com/STARIONGROUP/COMET-SDK-Community-Edition/actions/workflows/release.yml

Before a release can be made, the following steps shall be followed and executed:

  1. Run all unit tests and verify that they pass (with the exception of those tests that may need a running server)
  2. Make sure the version numbers of the projects are incremented when things have changed; the project makes use of SEMVER. To bump all versions at once, uses the versionBump.sh script (usage: ./versionBump.sh x.y.z)
  3. Update the in the .csproj files; this will be visible on https://nuget.org and the content will be used to create a draft release note when invoking the release Github Action
  4. Via the GitHub web-ui, update the draft release. The description includes the contents of the for each project in the solution

NOTE: The .csproj files contain settings that indicate that a symbols package is created as well. When using dotnet push to publish the packages on https://nuget.org, the symbols packages will be pushed as well

manual pre-release

First clean the solution and then pack. The pack command will build and create the nugets. The --version-suffix parameter is used to add a suffix such as rc01.

comet@developer:~$ dotnet clean -c Debug
comet@developer:~$ dotnet pack --version-suffix "rcxy" -c Debug

In case you want to push the new nugets to https://nuget.org use the following command. You will require an API Key. This needs to be repeated for each nuget that needs to be published.

comet@developer:~$ dotnet nuget push CDP4Common-CE.MAJOR.MINOR.PATCH-rcxy.nupkg -s https://api.nuget.org/v3/index.json --api-key "your-api-key"

Alternative way is to copy all necessary .nupkg files to a temp folder and run the following command in that folder:

comet@developer:~$ dotnet nuget push *.MAJOR.MINOR.PATCH-rcxy.nupkg -s https://api.nuget.org/v3/index.json --api-key "your-api-key"