| name: Release |
| |
| on: |
| push: |
| tags: |
| - '*' |
| |
| env: |
| NUGET_API_TOKEN: ${{ SECRETS.NUGET_API_TOKEN }} |
| |
| jobs: |
| release: |
| runs-on: windows-latest |
| |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v2 |
| with: |
| fetch-depth: 0 |
| |
| - name: Setup dotnet 3.1.x sdk |
| uses: actions/setup-dotnet@v1 |
| with: |
| dotnet-version: 3.1 |
| |
| - name: Check dotnet sdk install |
| run: dotnet --info |
| |
| - name: Install dependencies |
| run: dotnet restore |
| |
| - name: Build solution |
| run: dotnet build -c Release --no-restore |
| |
| - name: Test solution |
| run: dotnet test -c Release --no-build --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../ |
| |
| - name: Pack package |
| run: dotnet pack -c Release -o packages --no-build; |
| |
| - name: Push myget package |
| run: dotnet nuget push .\packages\*.nupkg -s nuget.org -k $env:NUGET_API_TOKEN --skip-duplicate |