name: Deployment

on:
  create:
    tags:
      - v[0-9]+.[0-9]+.[0-9]+*

jobs:
  deploy:

    runs-on: windows-latest

    steps:

    - name: Checkout
      uses: actions/checkout@v2

    - name: Fetch all history for all tags and branches so GitVersion can work its magic
      run: git fetch --prune --unshallow

    - name: Install GitVersion
      uses: gittools/actions/gitversion/setup@v0.9
      with:
        versionSpec: '5.1.x'

    - name: Use GitVersion
      id: gitversion # step id used as reference for output values
      uses: gittools/actions/gitversion/execute@v0.9

    - name: Setup MSBuild.exe
      uses: warrenbuckley/Setup-MSBuild@v1

    - name: Build and Package with MSBuild
      working-directory: src
      run: msbuild -t:"Clean;Pack" -restore -p:Configuration=Release -p:"Version=${{ steps.gitversion.outputs.fullSemVer }}" LpSolveDotNet.sln

    - name: Setup Nuget.exe
      uses: warrenbuckley/Setup-Nuget@v1

    - name: Push to nuget.org
      env:
        NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
      run: nuget push "build\output\LpSolveDotNet.*.nupkg" -Source https://api.nuget.org/v3/index.json -ApiKey %NUGET_APIKEY%

name: Deployment

on:
  create:
    tags:
      - v[0-9]+.[0-9]+.[0-9]+*

jobs:
  deploy:

    runs-on: windows-latest

    steps:

    - name: Checkout
      uses: actions/checkout@v2

    - name: Fetch all history for all tags and branches so GitVersion can work its magic
      run: git fetch --prune --unshallow

    - name: Install GitVersion
      uses: gittools/actions/gitversion/setup@v0.9
      with:
        versionSpec: '5.1.x'

    - name: Use GitVersion
      id: gitversion # step id used as reference for output values
      uses: gittools/actions/gitversion/execute@v0.9

    - name: Setup MSBuild.exe
      uses: warrenbuckley/Setup-MSBuild@v1

    - name: Build and Package with MSBuild
      working-directory: src
      run: msbuild -t:"Clean;Pack" -restore -p:Configuration=Release -p:"Version=${{ steps.gitversion.outputs.fullSemVer }}" LpSolveDotNet.sln

    - name: Setup Nuget.exe
      uses: warrenbuckley/Setup-Nuget@v1

    - name: Push to nuget.org
      env:
        NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
      run: nuget push "build\output\LpSolveDotNet.*.nupkg" -Source https://api.nuget.org/v3/index.json -ApiKey $env:NUGET_APIKEY

Use right syntax for environment variables in PowerShell
Use right syntax for environment variables in PowerShell
