MyGet - NuGet/dotnet pipelines sample
This project contains an example of building, packaging and publishing a .NET Core library to MyGet using Bitbucket Pipelines. Once published to MyGet, the package can be used in other projects using the NuGet package manager.
Want to learn more? Here's a full write-up on how a .NET Core build would work.
The pipelines configuration:
- Uses the .NET Core Docker image
- Generates a buld number that is suffixed to the library package version
- Runs the following commands:
dotnet test(optional, disabled by default)
- Publishes the package to a MyGet feed
Before being able to invoke the Bitbucket pipeline, there are a couple of environment variables to be configured:
MYGET_NUGET_URL: The full URL of the NuGet feed on MyGet (e.g.
MYGET_NUGET_APIKEY: MyGet API key
BUILD_CONFIGURATION: Build configuration (Debug/Release)