Sleet is a static NuGet package feed generator.
- Serverless. Create static feeds directly on Azure Storage or Amazon S3. No compute required.
- Cross platform. Sleet is built in .NET, it can run on .NET Framework, Mono, or dotnet CLI
- Fast. Static feeds are created using the NuGet v3 feed format.
- Symbol server. Assemblies and pdb files from packages are automatically indexed and provided as a symbol server.
- Simple. Sleet is a simple command line tool that can add, remove, and update packages.
- Flexible. Feeds can be written to disk and hosted with a web server to support authentication. Use the command line tool or a library to run Sleet programmatically.
- Download the latest nupkg from NuGet.org
- Extract tools/Sleet.exe to a local folder and run it.
dotnet tool install -g sleet
sleet
should now be on your PATH
- Download the latest nupkg from NuGet.org
- Extract the nupkg to a local folder
dotnet <PathToNupkg>/tools/netcoreapp2.1/any/Sleet.dll
Documentation can be found in the repo under doc
AppVeyor | Travis | Visual Studio Online |
---|---|---|
CI builds are located on the following NuGet feed:
https://nuget.blob.core.windows.net/packages/index.json
The list of packages on this feed is here.
This guide is used to setup a new feed hosted on azure storage.
Create a sleet.json
config file to define a new package feed hosted on azure storage.
sleet createconfig --azure
Edit sleet.json
using your editor of choice to set the url of your storage account and the connection string.
notepad sleet.json
{
"sources": [
{
"name": "feed",
"type": "azure",
"path": "https://yourStorageAccount.blob.core.windows.net/feed/",
"container": "feed",
"connectionString": "DefaultEndpointsProtocol=https;AccountName=;AccountKey=;BlobEndpoint="
}
]
}
Now initialize the feed, this creates the basic files needed to get started. The source
value here corresponds to the name
property used in sleet.json
.
sleet init --source feed
Add packages to the feed with the push command, this can be used with either a path to a single nupkg or a folder of nupkgs.
sleet push d:\nupkgsToPush --source feed
Add the feed as a source to your NuGet.Config
file. In the example above the package source URL is https://yourStorageAccount.blob.core.windows.net/feed/index.json
This guide is used to setup a new feed hosted on Amazon S3 storage.
Create a sleet.json
config file to define a new package feed hosted on azure storage.
sleet createconfig --s3
Edit sleet.json
using your editor of choice to set the url of your s3 bucket and access key.
notepad sleet.json
{
"sources": [
{
"name": "feed",
"type": "s3",
"path": "https://s3.amazonaws.com/my-bucket-feed/",
"bucketName": "my-bucket-feed",
"region": "us-east-1",
"accessKeyId": "IAM_ACCESS_KEY_ID",
"secretAccessKey": "IAM_SECRET_ACCESS_KEY"
}
]
}
Now initialize the feed, this creates the basic files needed to get started. The source
value here corresponds to the name
property used in sleet.json
.
sleet init --source feed
Add packages to the feed with the push command, this can be used with either a path to a single nupkg or a folder of nupkgs.
sleet push d:\nupkgsToPush --source feed
Add the feed as a source to your NuGet.Config
file. In the example above the package source URL is https://s3.amazonaws.com/my-bucket-feed/index.json
This guide is used to setup a new feed hosted on a local IIS Webserver.
Create a sleet.json
config file to define a new package feed hosted on IIS.
sleet createconfig --local
Open sleet.json
using your editor of choice, the file will look like similar to this
notepad sleet.json
{
"username": "",
"useremail": "",
"sources": [
{
"name": "myLocalFeed",
"type": "local",
"path": "C:\\myFeed",
"baseURI": "https://example.com/feed/"
}
]
}
Set path
to the local directory on disk where the feed json files will be written.
Change baseURI
to the URI the http server will use to serve the feed.
Now initialize the feed, this creates the basic files needed to get started.
- The
config
value here corresponds to the filesystem path to thesleet.json
file. - the
source
value here corresponds to thename
property used insleet.json
sleet init --config C:\sleet.json --source myLocalFeed
Add packages to the feed with the push command, this can be used with either a path to a single nupkg or a folder of nupkgs.
sleet push --config C:\sleet.json -s myLocalFeed C:\PackagesFolder
Create an empty ASP.NET Website project.
In the projects' web.config
file add the following lines:
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtensions=".nupkg" mimeType="application/zip"/>
<mimeMap fileExtension="." mimeType="application/json"/>
</staticContent>
</system.webServer>
</configuration>
Publish your ASP.NET website to your IIS server.
Copy the entire local feed output folder to a path on your IIS server (including all subfolders).
In Internet Information Services Manager
open your website, right click and choose Add Virtual Directory
- In
Alias
enter the URI you want to expose - in our example it'sfeed
- In
Physical Path
enter the path on the server you copied yourpath
output directory to.
Add the feed as a source to your NuGet.Config file. In the example above the package source URL is https://example.com/feed/index.json
Check out the full getting started guide here.
- Sleet.Azure provides MSBuild props/targets for running Sleet.