Skip to content

Updated Microsoft.SourceLink.GitHub #16

Updated Microsoft.SourceLink.GitHub

Updated Microsoft.SourceLink.GitHub #16

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- uses: nuget/setup-nuget@v1
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Restore
run: nuget restore Elmah.Io.Wpf.sln
- name: Build
run: msbuild Elmah.Io.Wpf.sln /t:Build /p:Configuration=Release /p:Version=5.1.${{ github.run_number }}-pre
- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal
- name: Pack
run: dotnet pack --configuration Release src/Elmah.Io.Wpf/Elmah.Io.Wpf.csproj /p:Version=5.1.${{ github.run_number }}-pre
- name: Install dotnet-validate
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
- name: Validate
run: dotnet-validate package local src/Elmah.Io.Wpf/bin/Release/Elmah.Io.Wpf.5.1.${{ github.run_number }}-pre.nupkg
- name: Push to nuget.org
run: dotnet nuget push src/Elmah.Io.Wpf/bin/Release/Elmah.Io.Wpf.5.1.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
if: ${{ github.event_name == 'push' }}