dotnet-desktop.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Build And Create Nuget Package
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. workflow_dispatch:
  8. schedule:
  9. - cron: '3 0 * * 0'
  10. jobs:
  11. main:
  12. runs-on: ${{ matrix.environment }}
  13. strategy:
  14. matrix:
  15. environment:
  16. - macos-latest
  17. - ubuntu-latest
  18. - windows-latest
  19. env:
  20. DOTNET_NOLOGO: 1
  21. DOTNET_CLI_TELEMETRY_OPTOUT: 1
  22. NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
  23. UNIT_TEST_PROJECT: QuestPDF.UnitTests/QuestPDF.UnitTests.csproj
  24. steps:
  25. - name: 📝 Fetch Sources 📝
  26. uses: actions/checkout@v3
  27. - name: ⚙ Setup .NET 6.0 SDK ⚙
  28. uses: actions/setup-dotnet@v3
  29. with:
  30. dotnet-version: '6.0.x'
  31. - name: 🔄 Restore Nuget Packages 🔄
  32. shell: bash
  33. run: dotnet restore
  34. working-directory: ./Source
  35. - name: 🛠 Build Solution 🛠
  36. shell: bash
  37. run: dotnet build -c Release --no-restore
  38. working-directory: ./Source
  39. - name: Upload build artifacts
  40. uses: actions/upload-artifact@v3
  41. if: ${{ matrix.environment == 'windows-latest' }}
  42. with:
  43. name: Build Package
  44. path: |
  45. **/*.nupkg
  46. **/*.snupkg
  47. !.nuget