Automatically create a matching release for every NuGet version (#759)
* Automatically create a matching release for every NuGet version
This commit is contained in:
13
.github/workflows/nuget.yaml
vendored
13
.github/workflows/nuget.yaml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user