Skip to content

Refresh Bugster

Refresh Bugster #64

Workflow file for this run

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@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore
- name: Check vulnerable NuGet packages
uses: elmahio/github-check-vulnerable-nuget-packages-action@v2
with:
projects: |
src/Elmah.Io.Extensions.Logging/Elmah.Io.Extensions.Logging.csproj
src/Elmah.Io.AspNetCore.ExtensionsLogging/Elmah.Io.AspNetCore.ExtensionsLogging.csproj
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Pack Elmah.Io.Extensions.Logging
run: dotnet pack --configuration Release src/Elmah.Io.Extensions.Logging/Elmah.Io.Extensions.Logging.csproj /p:Version=5.3.${{ github.run_number }}-pre
- name: Pack Elmah.Io.AspNetCore.ExtensionsLogging
run: dotnet pack --configuration Release src/Elmah.Io.AspNetCore.ExtensionsLogging/Elmah.Io.AspNetCore.ExtensionsLogging.csproj /p:Version=5.3.${{ github.run_number }}-pre
- name: Install dotnet-validate
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
- name: Validate Elmah.Io.Extensions.Logging
run: dotnet-validate package local src/Elmah.Io.Extensions.Logging/bin/Release/Elmah.Io.Extensions.Logging.5.3.${{ github.run_number }}-pre.nupkg
- name: Validate Elmah.Io.AspNetCore.ExtensionsLogging
run: dotnet-validate package local src/Elmah.Io.AspNetCore.ExtensionsLogging/bin/Release/Elmah.Io.AspNetCore.ExtensionsLogging.5.3.${{ github.run_number }}-pre.nupkg
- name: Push Elmah.Io.Extensions.Logginge to nuget.org
run: dotnet nuget push src/Elmah.Io.Extensions.Logging/bin/Release/Elmah.Io.Extensions.Logging.5.3.${{ 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.AspNetCore.ExtensionsLogging to nuget.org
run: dotnet nuget push src/Elmah.Io.AspNetCore.ExtensionsLogging/bin/Release/Elmah.Io.AspNetCore.ExtensionsLogging.5.3.${{ 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: Refresh Bugster
shell: pwsh
env:
FUNCTION_APP_URL: ${{ secrets.FUNCTION_APP_URL }}
run: |
$repoName = ($env:GITHUB_REPOSITORY -split '/')[1]
$json = @{ repository = $repoName } | ConvertTo-Json -Compress
curl --fail-with-body -X POST `
-H "Content-Type: application/json" `
-d "$json" `
$env:FUNCTION_APP_URL
if: ${{ github.event_name == 'push' }}