Automatically create a matching release for every NuGet version (#759)

* Automatically create a matching release for every NuGet version
This commit is contained in:
Max Horstmann
2022-01-11 11:31:19 -05:00
committed by GitHub
parent 250a45741e
commit 0e7ddae917

View File

@@ -40,3 +40,16 @@ jobs:
- name: dotnet nuget push - name: dotnet nuget push
run: dotnet nuget push pkg\*.nupkg -s https://www.nuget.org/ -k ${{ secrets.nuget_api_key }} 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