diff --git a/.github/workflows/nuget.yaml b/.github/workflows/nuget.yaml index 5808d47..a52289b 100644 --- a/.github/workflows/nuget.yaml +++ b/.github/workflows/nuget.yaml @@ -40,3 +40,16 @@ jobs: - name: dotnet nuget push run: dotnet nuget push pkg\*.nupkg -s https://www.nuget.org/ -k ${{ secrets.nuget_api_key }} + + # This step can be removed when GH runner has gh version 2.4.0 (2021-12-21) or higher + # As of 1/8/2022, runner has 2.3.0 which doesn't support --generate-notes below + - name: install latest gh cli + run: choco install gh + + - name: create release + shell: pwsh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + $VERSION = Get-ChildItem -Path pkg/*.nupkg -Name | Select-String -Pattern '\d+.\d+.\d+' | foreach {$_.Matches.Value} + gh release create --generate-notes $VERSION