new release strategy (#784)

* add draft

* nuget when release

* no release
This commit is contained in:
Boshi Lian
2022-02-24 14:14:14 -08:00
committed by GitHub
parent 2ad5b9613c
commit d49a3f09be
2 changed files with 50 additions and 11 deletions

47
.github/workflows/draft.yaml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: Nuget
on:
push:
branches: [ master ]
jobs:
draft:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: .NET Core 3.1.x SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: .NET 5.x SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: .NET 6.x SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: dotnet restore
run: dotnet restore --verbosity minimal --configfile nuget.config
- name: dotnet test
run: dotnet test
- name: dotnet pack
run: dotnet pack -c Release src/KubernetesClient -o pkg --include-symbols
- 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 -d --generate-notes $VERSION