fix(nuget): Exclude contentFiles from ProjectReference in mobile pack… #30
This file contains hidden or 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 & Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Restore workloads | |
| run: dotnet workload restore | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
| restore-keys: ${{ runner.os }}-nuget- | |
| - name: Verify DLL integrity checksums | |
| run: powershell -ExecutionPolicy Bypass -File scripts/VerifyChecksums.ps1 | |
| - name: Restore dependencies | |
| run: dotnet restore OpenCV5Sharp.slnx | |
| - name: Build | |
| run: dotnet build OpenCV5Sharp.slnx -c Release --no-restore | |
| - name: Test | |
| run: dotnet test OpenCV5Sharp.slnx --no-build -c Release --collect:"XPlat Code Coverage" --logger:"console;verbosity=detailed" | |
| - name: Pack NuGet (CPU) | |
| run: | | |
| dotnet pack src/OpenCV5Sharp/OpenCV5Sharp.csproj -c Release --no-build -o ./artifacts | |
| dotnet pack src/OpenCV5Sharp.Mobile/OpenCV5Sharp.Mobile.csproj -c Release --no-build -o ./artifacts | |
| - name: Upload NuGet Package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-packages | |
| path: ./artifacts/*.nupkg | |
| if-no-files-found: warn | |
| - name: Upload Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: '**/coverage.cobertura.xml' | |
| if-no-files-found: ignore |