Skip to content

Instantly share code, notes, and snippets.

@bert2
Last active May 15, 2019 15:14
Show Gist options
  • Save bert2/aba8861bb4c9faa6084518fdac149e56 to your computer and use it in GitHub Desktop.
Save bert2/aba8861bb4c9faa6084518fdac149e56 to your computer and use it in GitHub Desktop.
Outline for a short talk demonstrating continuous deployment of a GitHub repo to NuGet

Continuous Deployment from GitHub to NuGet with Cake and AppVeyor

The Example Project

The Goals

  • new release for every commit
    • ability to skip release for certain commits
  • use last commit message for release notes
  • automatic semantic versioning
  • ability to run build/deploy pipeline locally
  • configure build/deploy job with code

The Tools

  • GitHub: where the code will live
  • NuGet: where the released packages are published
  • Cake: to orchestrate the build/deploy pipeline
  • GitVersion: to calculate the package version
  • AppVeyor: where the build/deploy pipeline is executed

Cake

  • Cake = C# DSL
  • best served with VSCode + extension
  • download build.ps1
  • create build.cake
  • install & load NuGet packages with #addin/#tool
  • load Cake modules with #load
  • arguments and global variables
  • Task() + Does()
  • IsDependentOn()
  • WithCriteria()
  • documentation

GitVersion

  • Mainline mode
  • +semver: major

NuGet

  • account & API key
  • package meta data
  • setting package version & release notes
  • workaround to include referenced projects

AppVeyor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment