name: Push packages to NuGet

on:
  release:
    types: [published]

jobs:

  release:
    runs-on: ubuntu-18.04
    env:
      DOTNET_NOLOGO: true

    steps:
    - name: Check out our repo
      uses: actions/checkout@v2

    # Install the .NET Core 3.1 SDK for build and test
    - name: Setup .NET Core 3.1
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.x

    - name: Build
      run: |
        dotnet build -c Release
        dotnet test -c Release
        mkdir nuget

    - name: Push to NuGet
      run: |
        dotnet pack -c Release -o $PWD/nuget
        # For now, just display the NuGet packages we'd push in reality.
        ls nuget

Add a GitHub action to push NuGet packages when a release is created
Add a GitHub action to push NuGet packages when a release is created

This commit won't actually push anything - but it will allow
us to test things before we *do* manually create a release.

Once testing is completed, we'll want to use a (suitably encrypted)
NuGet API key to push to NuGet.

Note that this initially assumes we want to release all packages at
the same time. We'll want to change it when we reach GA for 2.0.0.

Signed-off-by: Jon Skeet <8a9602d66334021c18cbf0bdb2fa15f4cb6de9df@google.com>
