How to prepare and build a Nuget release. - GalacticAPI/Galactic GitHub Wiki

How to prepare and build a Nuget release

Increment the version if necessary

  • If the release includes a new project within the solution, increment the minor version number in Versioning/AutoAssemblyVersion.tt.
  • If the release includes large scale changes to the API architecture or changes that will break existing code using the API, increment the major version number.
  • In either case, set the date of the version change to the UTC date that the code base was built and packaged.
  • Propagate the change to all projects within the solution by selecting 'Build | Transform All T4 Templates' within Visual Studio.

Note: This step is not necessary for updates to existing projects.

Build the solution

  • Set the solution to use the 'Release' configuration.
  • Build the solution.
  • Repeat using the 'Debug' configuration.
  • Check that the version of the DLLs in the 'Release' and 'Debug' folders within the 'SharedLibraries' local repository match those of the solution. (This is where the DLLs are placed after they are built.)
  • Commit and push the changes in the Galactic API solution to the Github remote repository (typically 'origin'). The commit comment should include: 'Updated version to #.#.0.#' where the version corresponds with the version of the API built along with any other comments relevant to the release.
  • Commit and push the changed DLLs in the Shared Libraries solution to the GitHub remote repository (typically 'origin'). The commit comment should read: 'Updated DLLs to version #.#.0.# of the Galactic library.' Where the version corresponds with the version of the API built.
  • Add a tag to the local and remote repositories (both Galactic API and Shared Libraries) with the format 'v#.#.0.#' that corresponds with the version of the API built.

Build the documentation solution

  • Build the GalacticDocumentation solution. (It's a Sandcastle Help File Builder project. https://github.com/EWSoftware/SHFB)
  • Commit and push the changes to the GitHub remote repository. The commit comment should read: 'Updated documentation to version #.#.0.# of the Galactic library.' Where the version corresponds with the version of the API built.
  • Add a tag to the local and remote repositories with the format 'v#.#.0.#' that corresponds with the version of the API built.

Build and publish the Nuget packages

  • Make sure you have the Nuget command-line client installed and placed somewhere in your path. https://dist.nuget.org/index.html
    The Nuget Package Explorer is also helpful to check the built packages.
    https://github.com/NuGetPackageExplorer/NuGetPackageExplorer
  • From the 'Scripts' folder of the Galactic-NuGet repository, run .\buildAllPackages.ps1 #.#.0.# where the version number corresponds with the version of the API previously built.
  • (Optional) Use the Nuget Package Explorer to check a package, especially any that are new to this release.
  • Commit and push the changes to the GitHub remote repository. The commit comment should read: 'Updated packages to version #.#.0.# of Galactic library.' Where the version corresponds with the version of the API built.
  • Add a tag to the local and remote repositories with the format 'v#.#.0.#' that corresponds with the version of the API built.
  • If this is your first time packaging with Nuget on your computer, you'll need to set the API Key: nuget setApiKey <apiKey>
  • From the 'Scripts' folder run .\publishAllPackages.ps1 to publish the packages to Nuget.
  • After the packages are uploaded, query Nuget to see that the new versions are available. (Sometimes you need to wait for the Nuget cache to update to see the new packages. You can instantly see the packages by logging into Nuget and going to 'Manage my Packages'.)

Update the Galactic API website

Post new documentation

  • Copy the contents of the GalacticDocumentation solution '\Help' folder to the galactic.github.io solution '\documentation'. Delete any existing files in the destination folder.
  • Zip up the contents of the SharedLibraries solution '\Release\Galactic' folder. Name the file 'Galactic-#.#.0.#.zip' with the corresponding version of the API built. Copy the ZIP file to the galactic.github.io solution '\downloads' folder.
  • Update the download.html file with the name of the new ZIP file, and the latest version number of the API available.
  • Commit and push the changes to the GitHub remote repository. The commit comment should read: 'Added v#.#.0.# of the library to the downloads page. Updated the documentation to match.' Where the version corresponds with the version of the API built.
⚠️ **GitHub.com Fallback** ⚠️