Create installation #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
with: | |
dotnet-version: 8.0.x | |
- uses: nuget/setup-nuget@v2 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Restore | |
run: nuget restore elmah.io.sln | |
- name: Build | |
run: msbuild elmah.io.sln /t:Build /p:Configuration=Release /p:Version=5.2.${{ github.run_number }}-pre | |
- name: Test | |
run: dotnet vstest test\Elmah.Io.Tests\bin\Release\net472\Elmah.Io.Tests.dll | |
- name: Pack Elmah.Io | |
run: nuget pack Elmah.Io.nuspec -Version 5.2.${{ github.run_number }}-pre -Properties Configuration=Release -Properties Commit=${{ github.sha }} | |
- name: Pack Elmah.Io.AspNet | |
run: nuget pack Elmah.Io.AspNet.nuspec -Version 5.2.${{ github.run_number }}-pre -Properties Configuration=Release -Properties Commit=${{ github.sha }} | |
- name: Pack Elmah.Io.Mvc | |
run: nuget pack Elmah.Io.Mvc.nuspec -Version 5.2.${{ github.run_number }}-pre -Properties Configuration=Release -Properties Commit=${{ github.sha }} | |
- name: Pack Elmah.Io.WebApi | |
run: nuget pack Elmah.Io.WebApi.nuspec -Version 5.2.${{ github.run_number }}-pre -Properties Configuration=Release -Properties Commit=${{ github.sha }} | |
- name: Install dotnet-validate | |
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304 | |
- name: Validate Elmah.Io | |
run: dotnet-validate package local elmah.io.5.2.${{ github.run_number }}-pre.nupkg | |
- name: Validate Elmah.Io.AspNet | |
run: dotnet-validate package local Elmah.Io.AspNet.5.2.${{ github.run_number }}-pre.nupkg | |
- name: Validate Elmah.Io.Mvc | |
run: dotnet-validate package local Elmah.Io.Mvc.5.2.${{ github.run_number }}-pre.nupkg | |
- name: Validate Elmah.Io.WebApi | |
run: dotnet-validate package local Elmah.Io.WebApi.5.2.${{ github.run_number }}-pre.nupkg | |
- name: Push Elmah.Io | |
run: dotnet nuget push Elmah.Io.5.2.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
if: ${{ github.event_name == 'push' }} | |
- name: Push Elmah.Io.AspNet | |
run: dotnet nuget push Elmah.Io.AspNet.5.2.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
if: ${{ github.event_name == 'push' }} | |
- name: Push Elmah.Io.Mvc | |
run: dotnet nuget push Elmah.Io.Mvc.5.2.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
if: ${{ github.event_name == 'push' }} | |
- name: Push Elmah.Io.WebApi | |
run: dotnet nuget push Elmah.Io.WebApi.5.2.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
if: ${{ github.event_name == 'push' }} |