question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using GitHub to host a NuGet feed/packages?

See original GitHub issue

I want to setup CD for my repos, but I have a few problems.

  1. I’d like to deploy every commit to a NuGet feed.
  2. I don’t want to spam nuget.org with each and every commit (even pull requests).
  3. My packages contain native libraries which eat a lot of space. This rules out MyGet since there storage quotas are low.

This leads me to my next question.

What about creating a GitHub repository that contains the required files for a valid NuGet feed?

“But what about the large nupkg files?” Yeah, you wouldn’t want to commit large binaries into a repository. So instead, I will configure my CI/CD to auto-upload my nupk files to a GitHub release which has no size limits. The static files the represent my NuGet feed will point to the nupkg files uploaded to the GitHub release.

I’d like to do something like this.

# Assume v0.1.0 is a GitHub release in the repo "pauldotknopf/myfeed".
sleet push pauldotknopf/myfeed:v0.1.0 --source myGitRepoFeed

The GitHub release would be inspected and would update the NuGet feed.

What do you think? Is this feasible? If so, would you be open to a PR?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
emgartencommented, Feb 14, 2019

If anyone has instructions for getting sleet to work with github I’m happy to take a doc PR for it https://github.com/emgarten/Sleet/tree/master/doc

1reaction
inosikcommented, Aug 28, 2018

I’m experimenting with a simpler version of this at the moment. This is what my sleet.config looks like:

{
  "sources": [
    {
      "name": "gitlab",
      "type": "local",
      "path": "$rootDir$/v3",
      "baseURI": "https://gitlab.my-company.local/my-team/packages/raw/master/v3"
    }
  ]
}

The feed URL for clients is https://gitlab.my-company.local/my-team/packages/raw/master/v3/index.json.

I’m building a small web service based on Giraffe which implements the NuGet push endpoint and commits the pushed package file via GitLabs API to the repository. What I have left to do is to set up a CI job in GitLab to update the feed when a package file is commited.

I’m sure this can also be done with GitHub. Probably the feed can also be served with GitHub Pages.

“But what about the large nupkg files?” Yeah, you wouldn’t want to commit large binaries into a repository.

Is this a problem? Maybe Git LFS can be used to reduce the repository size.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overview of Hosting Your Own NuGet Feeds
NuGet Gallery: Packages are hosted on an Internet server using the NuGet Gallery Project (github.com). NuGet Gallery provides user management and features such ......
Read more >
Overview of Hosting Your Own NuGet Feeds
An overview of opens for hosting your own NuGet package feeds or galleries either locally or remotely.
Read more >
Hosting NuGet packages on GitHub | HildenCo Solutions
The simplest way to do so is by configuring it via Visual Studio. For that, select the Project and Alt-Enter it (or right-click...
Read more >
How to Publish NuGet Packages with GitHub
1. Log in to your GitHub organization or your profile account. 2. Go to "developer settings" and then personal access tokens. 3. In ......
Read more >
Untitled
GitHub Packages: Your packages, at home with their code GitHub Packages: Private NuGet Packages via GitHub Actions Overview of Hosting Your Own NuGet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found