Skip to content

Release of new versions of the nuget packages

likp edited this page May 5, 2022 · 1 revision

Problem

As a maintainer of a nuget package for PxWeb I want to be able to release new version of the packages.

Solution

The building och releasing a new package to Nuget.org has been automated trough a Github action that is triggered when a new GitHub release is done.

Prerequisites

Make sure that the repository contains the .github/workflows/nuget.yml file

Steps to create a release

  1. Go to the releases page of the repository
  2. Select to Draft a new release
  3. Create a new tag for the release. Make sure that the tag starts with v and then the version number using the semver2 convention e.g. v1.2.1. If you add -beta the nuget package will be marked as a pre-release.
  4. In the Release title field set it to the name of the package and the version number without the v prefix e.g. PCAxis.Core 1.2.1
  5. If it is a pre-release check the pre-release ticker
  6. Select Publish release

If you go to action you should see that it has started to build a new packages and that it will eventually push it to Nuget.org. It can take a couple of minutes before it show up in Nuget.org since it has to be verified before it is made available.