Test on .net 8. Functions doesn't support .net 8 yet but now we at le… #32
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: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
3.1.x | |
6.0.x | |
8.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --configuration Release --no-build --verbosity normal | |
- name: Pack | |
run: dotnet pack --configuration Release src/Elmah.Io.Functions/Elmah.Io.Functions.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.Functions/bin/Release/Elmah.Io.Functions.5.1.${{ github.run_number }}-pre.nupkg | |
- name: Push to nuget.org | |
run: dotnet nuget push src/Elmah.Io.Functions/bin/Release/Elmah.Io.Functions.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' }} |