name: Publish Release to NuGet

on:
  push:
    tags:
      - v*

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    - name: Setup .NET 6
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 6.0.*
    - name: Build with dotnet
      run: ./build.sh --verbosity=verbose
      shell: bash

    - name: Publish to NuGet
      run: dotnet nuget push packaging/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }}
      shell: bash
