Skip to content

Commit 0e7ddae

Browse files
authored
Automatically create a matching release for every NuGet version (#759)
* Automatically create a matching release for every NuGet version
1 parent 250a457 commit 0e7ddae

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: .github/workflows/nuget.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,16 @@ jobs:
4040

4141
- name: dotnet nuget push
4242
run: dotnet nuget push pkg\*.nupkg -s https://www.nuget.org/ -k ${{ secrets.nuget_api_key }}
43+
44+
# This step can be removed when GH runner has gh version 2.4.0 (2021-12-21) or higher
45+
# As of 1/8/2022, runner has 2.3.0 which doesn't support --generate-notes below
46+
- name: install latest gh cli
47+
run: choco install gh
48+
49+
- name: create release
50+
shell: pwsh
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
run: |
54+
$VERSION = Get-ChildItem -Path pkg/*.nupkg -Name | Select-String -Pattern '\d+.\d+.\d+' | foreach {$_.Matches.Value}
55+
gh release create --generate-notes $VERSION

0 commit comments

Comments
 (0)