diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 8c75e4634b..e7ed79ff6d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,13 +1,8 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - name: .NET -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] +on: + push: {} + pull_request: {} workflow_dispatch: inputs: publish-packages: @@ -34,6 +29,15 @@ jobs: with: dotnet-version: 8.0.x + - name: Clear NuGet Cache + run: dotnet nuget locals all --clear + + - name: Restore Packages + run: | + for i in {1..3}; do + dotnet restore && break || sleep 10; + done + - name: Build run: dotnet build -c Release