-
Couldn't load subscription status.
- Fork 30
Releasing to nuget
In order to release a version to NuGet you must do the following:
We try to use semantic versioning for this. Check the latest release and use your knowledge of what's been added since then to figure out the new version number. If you're not sure, then ask around.
Remember to point your release at the last commit that the release contains. Usually this will be HEAD / master, but it may not be. If you need to do this, click the Recent Commits tab within the Target dropdown and select the correct commit from there.
You'll then need to write some helpful release notes, containing new features, breaking changes etc. Always prepend your version tag name with v as directed.
If you've followed the Contributing instructions correctly, then you should have an upstream remote pointing to the main 7digital fork. Then run the following from the command line, it's best to use the powershell terminal from here, as you'll need it for step 3.
posh-git is a useful addition for PowerShell git integration.
git fetch upstream --tags-
git checkout v{VERSION}where{VERSION}is your new release number (e.g.5.0.1)
You should now have a local copy of your release.
For this you will need the buildpackage/buildpackage.ps1 script, details of which are here.
- Install the latest version of the NuGet CLI, chocolatey works well for this.
-
nuget setApiKey {API_KEY}
Set nuget api key to the 7digital account key, if you don't have this you'll need to get it from someone who has. You should only need to do this step once. -
cd buildpackage
navigate to the buildpackages folder -
.\buildpackage.ps1 -v "{VERSION}"perform a dry run, -s so that you can check the nuspec file and package to make sure it's all OK -
.\buildpackage.ps1 -v "{VERSION}" -push true -source https://www.nuget.org/api/v2/packagePush the version to public nuget
It's important for your own sanity to checkout master again
git checkout master
It's also a good idea to check the NuGet website to make sure your released package is there