-
I’m looking to move all of our company’s NuGet packages to GPR; we’re migrating all our git repos into GitHub, so it makes sense to me to host all our artifacts in GitHub too. However, I can’t currently see a way I can get all of the historical versions from our current, self-hosted (but otherwise standard) NuGet feed into the GitHub Package Registry. What I’d like to do ideally, on a repo-by-repo basis, is:
After some research, I found that there’s a Powershell module which would help if we wanted to migrate to Azure Artifacts, but before I try hacking about with that code or writing something from scratch myself, I thought it was worth asking here! Is there anything like this available, or has anyone else scripted this yet? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The trick will be to update the I have a .NET Core tool that supports publishing NuGet packages to the GitHub Package registry (and a few other things). You can find it here: https://github.com/jcansdale/gpr There’s an issue open about automatically adding the repository url on push:
Feel free to comment or send a PR my way! 😄 |
Beta Was this translation helpful? Give feedback.
-
I tried it and can confirm it works. It rewrites the nuspec file and adds the node that github requires |
Beta Was this translation helpful? Give feedback.
The trick will be to update the
<repository url="..." />
element in the .nuspec file in your .nupkg. This is mandatory when publishing to GitHub Packages and tells the registry which repository to associate with your package.I have a .NET Core tool that supports publishing NuGet packages to the GitHub Package registry (and a few other things). You can find it here: https://github.com/jcansdale/gpr
There’s an issue open about automatically adding the repository url on push:
jcansdale/gpr#48
Feel free to comment or send a PR…